News for hackers. Stuff that matters.
Re:Useful GCC warning options not enabled by -Wall -Wextra by quotemstr on Wednesday October 04, 2017 @09:04PM (#15406095)
Sure. The rule you suggest might be good coding practice --- but people can disagree, and their omitting the extra braces doesn't make the code wrong. An existing correct program shouldn't one day stop building because someone added a warning that enforces your preferred operating precedence marking style.
Re:Useful GCC warning options not enabled by -Wall -Wextra by zaphar on Wednesday October 04, 2017 @10:47PM (#15406411)
That is because the compiler authors conflated warnings with a linter. Warnings should be used to indicate basically just two things.

1. Dead/Duplicated Code.

2. Probably Broken Code.

Anything else is stylistic and the realm of opinion. Even if it's informed opinion enforcing it belongs in a linter.

Re:Useful GCC warning options not enabled by -Wall -Wextra by quotemstr on Wednesday October 04, 2017 @11:53PM (#15406583)
To be fair, a compiler contains all the infrastructure you'd want in a linter. I don't mind compilers having lint-like warnings: I just want them to very clear about the differences between these warnings and warnings that reflect functional problems with high probability.
Re:Useful GCC warning options not enabled by -Wall -Wextra by evincarofautumn on Thursday October 05, 2017 @09:18AM (#15408878)
What I’d like is for compiler authors to just admit this and include a lint mode.

There’s some practical and political difficulty with adding new warnings to a widely used compiler, partly because you don’t want to generate too many new warnings for existing code, partly because people compile with -Werror and upgrading the compiler will break (well, sprain) their build. Those difficulties would be easy to skirt by just tossing new warnings into lint mode and promoting them to compiler warnings if they turn out to be very useful in practice.

Re:Useful GCC warning options not enabled by -Wall -Wextra by zaphar on Thursday October 05, 2017 @02:02PM (#15411168)
I agree. A -Wlint would be a great way to keep the distinction but reuse the compilers infrastructure.