an ambiguity in C89 which will never be fixed
- Programming
- Developer Tools
- Open Source
- Standards
The post walks through an ambiguity in C89 created by the interaction of old K&R-era function declaration rules, implicit int, and the now-removed rule that undeclared functions are assumed to return int with unspecified parameters. The author’s point is narrow but interesting: because later standards deleted the behavior instead of clarifying the original wording, there will never be an official answer to what C89 meant in this edge case.
If you maintain old C, assume pre-C99 rules can still bite in surprising ways when ancient compilers or build flags are involved. Audit for missing prototypes, crank warnings up aggressively, and do not rely on C++ mode as a lint pass for C code.
-
sebsite.pw
- Discuss on HN