This is the mail archive of the
mailing list for the GCC project.
Re: optimization/7557: gcc-3.1.1 (debian/i386): wrong code with -O2 / bitfields / pointer aliasing
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, js at convergence dot de
- Cc: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org, sirl at gcc dot gnu dot org
- Date: Tue, 13 Aug 2002 13:00:03 -0400 (EDT)
- Subject: Re: optimization/7557: gcc-3.1.1 (debian/i386): wrong code with -O2 / bitfields / pointer aliasing
<<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)