compiler wont ignor warnings
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
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement