Hacker News new | past | comments | ask | show | jobs | submit login

A new compiler version isn't a new version of the language. Most warnings are about completely valid code which nonetheless should be avoided. Code which was correct in an earlier version if GCC continues to be correct in new versions of GCC.

Unused variables, using `if (somevar = othervar)` instead of `if ((somevar = othervar))`, code which uses operators without parentheses where GCC has decided the operator precedence is unexpected and should have extra parentheses to be clearer, a switch which doesn't cover all the values of an enum, unnecessary parentheses in a variable declaration. Those are all warnings which absolutely don't mean that the code is broken. The author should absolutely fix new warnings like that, but that shouldn't be the responsibility of someone who just wants to use your open source project.




I agree about open source projects, then compiler options should not be so strict. But during development it might be useful; I use -Werror before releasing piece of code, just not to add any new warnings.

BTW, a few years ago we had a nasty bug (feature?), that might have been prevented when converted into error, but... "because we always have very large build logs I didn't notice the new warning." http://0x80.pl/notesen/2015-03-22-compiler-warnings.html




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: