Re:Useful GCC warning options not enabled by -Wall -Wextra
by userbinator on Wednesday October 04, 2017 @10:36PM
(#15406381)
There is also -Wlogical-op-parentheses, which rather condescendingly implies that you don't know the precedence of || vs &&. (The main use of parentheses is specifically to indicate precedence different from the usual, since otherwise they just add noise to the code and reduce clarity.) I half-expect -Warithmetic-op-parentheses or even -Wop-parentheses to show up in some future version of clang...
Unfortunately there's no corresponding -Wuseless-parentheses, which if present would truly make -Weverything a "damned if you do, damned if you don't".
Re:Useful GCC warning options not enabled by -Wall -Wextra
by Too on Thursday October 05, 2017 @12:46AM
(#15406726)
I think clang added a -Weverything just to prove a point why it's a bad idea to actually contain _all_ warnings in -Wall.
As you say, some warnings are contradictory and it's up to the project to decide which one of them is more important.
Re:Useful GCC warning options not enabled by -Wall -Wextra
by 2trill2spill on Wednesday October 04, 2017 @06:40PM
(#15405361)
Then turn off that warning if you don't like/want it.
Seriously?