Possible bug in optimization
Zack Weinberg
zack@codesourcery.com
Tue Feb 18 21:02:00 GMT 2003
"Chris Croswhite" <ccroswhite@get2chip.com> writes:
> How is this casting & masking undefined in O but -g works OKAY?
> Also, why does 2.95.x treat this as expected? Also, Sun, HP and
> Intel compilers treat this as expected? What am I not understanding
> about c/c++ standard?
It's always undefined. Undefined behavior means the C standard does
not define the behavior, which means C compilers are free to do
whatever they like with it. They are allowed to produce the behavior
that you expected; they are also allowed to produce behavior that you
did not expect.
zw
More information about the Gcc-bugs
mailing list