23 ms·
If your compiler doesn't warn you about that, try upgrading to an alternative. Anything more recent than the last twenty years should do.
by joosters 13y ago
If your compiler doesn't warn you about that, try upgrading to an alternative. Anything more recent than the last twenty years should do.
- betterunix 13y agoI see an awful lot of C and C++ projects that generate large numbers of warnings during a build. It would be pretty easy to miss one like that.
- kibibu 13y agoWhich is why gcc -Werror is a good idea
- betterunix 13y agoSo you are going to take the time to correct hundreds or sometimes thousands of warnings in some open source program you need to use at your job?
- kevinnk 13y agoNo one said that... -Werror is good when you are developing, not when you are compiling someone else's code.
- qznc 13y agoEvery good programmer I met enables as many warnings as possible and strives for zero warnings. This is just professional practice like keeping your code in a version control system.
- joosters 13y agogcc/clang warns about this particular problem without any extra command-line options. You need to go out of your way to stop it complaining.