|
|
|
|
|
by userbinator
3182 days ago
|
|
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". |
|