Hacker News

Favorites Setup
Comment by Someone | original | C for Rust programmers
[−]Someone · 2026-10-11 Sun 10:52 UTC · link
One reason is that there is no such thing as the compiler. C ‘always’ had many different implementations.

Requiring all of them to adopt common linting rules at the same time is infeasible.

Also, it’s not true that linting rules never become part of the compiler. For example, the original lint (https://wolfram.schneider.org/bsd/7thEdManVol2/lint/lint.pdf) states

“The type-checking rules also require that, in structure references, the left operand of the -> be a pointer to structure”

and mentions warnings on such statements as

  int i 1;
  i =- 1;
Modern C compilers also warn way more often about unreachable code, pointer incompatibilities, etc. than those from the 1970s