This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: wrong alias-analysis and strange x86-code
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Subject: Re: wrong alias-analysis and strange x86-code
- From: Volker Barthelmann <vb at compilers dot de>
- Date: Wed, 25 Oct 2000 03:38:42 +0200
- Cc: gcc-bugs at gcc dot gnu dot org,Geoff Keating <geoffk at cygnus dot com>
- References: <200010242218.e9OMIXn01450@mururoa.inria.fr>
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