This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/7465: Same function produced bad ARM code with C++ but correct one with C
- From: rearnsha at gcc dot gnu dot org
- To: eric dot paire at ri dot silicomp dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 5 Aug 2002 13:31:50 -0000
- Subject: Re: optimization/7465: Same function produced bad ARM code with C++ but correct one with C
- Reply-to: rearnsha at gcc dot gnu dot org, eric dot paire at ri dot silicomp dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Same function produced bad ARM code with C++ but correct one with C
State-Changed-From-To: open->closed
State-Changed-By: rearnsha
State-Changed-When: Mon Aug 5 06:31:50 2002
State-Changed-Why:
That this code does not fail for C is luck rather than anything else.
Your code violates the aliasing rules of both languages, see the
manual under -fstrict-aliasing for details of how, why and how you
might avoid the problem.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7465