wrong alias-analysis and strange x86-code

Volker Barthelmann vb@compilers.de
Tue Oct 24 18:36:00 GMT 2000


On Wed, 25 Oct 2000 Theodore Papadopoulo wrote:
> Well, correct me if I'm wrong...
> 
> gcc-2.95.2 had -fstrict-aliasing by default whereas it is currently 
> not enabled unless you ask for it.

The behaviour I posted should not depend on this option. The manual says
-fstrict-aliasing assumes the strictest rules imposed by the language. It
does not say that it imposes additional rules, therefore no program which
does not violate these rules should be affected by this switch.

I don't think the example I provided breaks any aliasing rules of ISO C and
therefore I think the behaviour of gcc here is broken. Even if I specify
-fstrict-aliasing I expect this program to be translated correctly.

Volker


More information about the Gcc-bugs mailing list