>>> (in which case, nearly all real-world code is broken)>>>> Not "nearly all" -- but lots of code, yes.>> I wouldn't say "lots of code". I would say "all real projects".

All projects that tell the compiler they're written in ISO C,while they're not, can easily break, sure. You can't say thisis GCC's fault; sure in some cases decisions were made thatresulted in more of those programs breaking than was reallynecessary, but it's obviously *impossible* to prevent allfrom breaking.

And yes it's true: most people do not program in ISO C at all,_even if they think they do_, simply because they are not awareof all the rules. For some of the areas where most of themistakes are made, for example aliasing rules and signed overflow,GCC provides helpful options to switch behaviour to somethingthat makes those people's programs work. You can also use thoseoptions if you have made a conscious decision that you want towrite your code in one of the resulting dialects of C.

Segher

p.s. If it's decided to not use -fwrapv, a debug option thatsets -ftrapv can be introduced -- it will make it a BUG() ifany (accidental) signed overflow happens after all.