C as portable assembler
Posted May 31, 2011 18:05 UTC (Tue) by anton
In reply to: C as portable assembler
Parent article: What Every C Programmer Should Know About Undefined Behavior #3/3
The funny thing is that new gcc (at least up to 4.4) still generates code for signed addition that wraps around instead of code that traps on overflow. It's as if the aim of the gcc maintainers was to be least helpful to everyone: for the low-level coders, miscompile their code silently; for the specification pedants, avoid giving them ways to detect when they have violated the spec.
to post comments)