Re:Clang is better than GCC
by nerdponx on Sunday November 27, 2022 @07:59PM
(#33768653)
> Or maybe I should stop using pure C...
Or at least stop jamming so much stuff into one line, and use whitespace around operators!
To be fair to C, problems like this exist in a lot of languages, even more-strongly-typed ones. At some point, a linter comes in handy. It's nice if the compiler has linting built in, but at some point you need to draw a line between "compiler warnings/notes" and "lint to be found by an external tool".
Or at least stop jamming so much stuff into one line, and use whitespace around operators!
To be fair to C, problems like this exist in a lot of languages, even more-strongly-typed ones. At some point, a linter comes in handy. It's nice if the compiler has linting built in, but at some point you need to draw a line between "compiler warnings/notes" and "lint to be found by an external tool".