optimization/7557: gcc-3.1.1 (debian/i386): wrong code with -O2 / bitfields / pointer aliasing
Robert Dewar
dewar@gnat.com
Tue Aug 13 10:00:00 GMT 2002
<<But I think it would be a good idea to give out a warning that old
(or new) junk code will no longer work with gcc-3.x when compiled with -O2.
After all the old junk code will have to be changed (or at least
identified, so -fno-strict-aliasing can be used where necessary). And
that's much easier when you know what to look for.
>>
Well such a warning could certainly go in the documentation, but surely you
are not suggesting that every time someone does a compilation with -O2 that
a junk warning be issued?
(the compiler cannot of course detect cases where there is a problem, that's
the whole point of the aliasing rules)
More information about the Gcc-bugs
mailing list