------- Comment #22 from rguenth at gcc dot gnu dot org 2010-01-30 22:41 ------- (In reply to comment #21) > Steven: > > > FWIW the tri-state solution is problematic because... > > Fair enough. This is why you're the gcc developer and not me ;-) > > However, correct output should be more important than optimized output.
It is. > Also, I fail to see how my blog is considered trolling. gcc *is* breaking code > without warning. Well, your code invokes undefined behavior according to GCCs interpretation of the C standard. So it is not "breaking" it. Also we can't really do better in the sense of making use of the invariants the C standards guarantee and at the same time not "break" code like yours. If it would be trivial and obvious to do so we would do it - it's not like we are breaking your code just because we can. It's because the compiler does not see what you are intending to do. This giving leeway to code invoking undefined behavior might improve or regress from release to release. The most important thing is to generate correct code from well-defined input (and there are still bugs with that, so ...) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42907