3 ms·
> If the aim is no warnings, and that can even be a hard rule, then you also want to add -Werror to treat all warnings as errors Hard disagree. No warnings mea
by account42 4y ago
> If the aim is no warnings, and that can even be a hard rule, then you also want to add -Werror to treat all warnings as errors
Hard disagree. No warnings means CI should fail (or otherwise scream loudly), not every build of your in-progress working tree. You can add a commit hook if you want but if it needs to be enforced then it isn't really discipline.
Even for CI you probably don't want -Werror but instead run the build completely so that you can track all warnings.
And for source released to others -Werror is downright rude as you have no idea what warnings their possible future compiler will have.