gcc 3.3 / i386 / -O2 question

Robert Dewar dewar@gnat.com
Wed Nov 17 13:06:00 GMT 2004


Dave Korn wrote:

>   However as I mentioned, the behaviour of unsigned integers in overflow
> conditions IS well defined, and so if the compiler produced code that behaved
> differently at -O0 and -O2 when you took that example code and changed "int" to
> "unsigned int" everywhere, that *would* be a genuine compiler bug, and one that
> would need fixing.

Indeed! In fact I would not even use the term overflow in conjunction with
unsigned, the unsigned semantics is modular, and there is no overlow :-)



More information about the Gcc mailing list