Sign in to follow this  
raptorstrike

compiler wont ignor warnings

Recommended Posts

isnt the compile just sapposed to give you the warnings but compile any way? thats y its a warning not an error right? any way mine isnt doing that im using dev-cpp v.4.9.9.0 c++ how do i change this [smile] thx

Share this post


Link to post
Share on other sites
There are occasions when ignoring warnings is warranted. Offhand, I can think of two examples that I have seen: One, the retarded warning that VC++ 6.0 gives about debug symbols being too long (which doesn't provide any useful information and doesn't pertain to anything suspicious in your code), and two, a warning in a program of mine about a conversion that didn't make any sense (in a templated class where strange but harmless things happened with one particular type).

Unless you have any such particular circumstances, however, you should not ignore warnings. They are there for a reason. Personally, I always set my compiler to treat warnings as errors.

Share this post


Link to post
Share on other sites
I always compile with lots of extra warnings enabled, and the compiler set to treat warnings as errors. It warns you of things for a reason, fix what it's complaining about, or rearrange things so it's clear to you, the compiler, and anyone reading it that is really want you wanted.

I don't use -Weffc++ very often though because it tends to complain about STL, especially about base classes not having virtual destructors. But all the other warnings are pretty useful to have enabled.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this