Red Echo

April 14, 2016

While there are hundreds of C compilers in existence – it’s even possible, though highly unlikely, that the terrible C compiler I wrote back in 1997 is still out there somewhere – there are only two (and a half) of them which actually matter. The maintainers of these compilers increasingly subscribe to a pedantic, user-hostile interpretation of the C language which, as a user of the language, has become rather troubling:

Recently we have seen spectacular advances in compiler optimisation. Spectacular in that large swathes of existing previously-working code have been discovered, by diligent compilers, to be contrary to the published C standard, and `optimised’ into non-working machine code.

In fact, it turns out that there is practically no existing C code which is correct according to said standards (including C compilers themselves).

Real existing code does not conform to the rules now being enforced by compilers. Indeed often it can be very hard to write new code which does conform to the rules, even if you know what the rules are and take great care.

It’s an interesting post by Ian Jackson of the Debian project which some additional links that are worth reading if you have an interest in this sort of thing.