This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/9052: in C code, "if" statement fails to execute if optimized
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 12 Feb 2003 16:46:00 -0000
- Subject: Re: optimization/9052: in C code, "if" statement fails to execute if optimized
- Reply-to: Richard Earnshaw <rearnsha at arm dot com>
The following reply was made to PR optimization/9052; it has been noted by GNATS.
From: Richard Earnshaw <rearnsha@arm.com>
To: Steven Bosscher <s.bosscher@student.tudelft.nl>
Cc: Richard.Earnshaw@arm.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
nobody@gcc.gnu.org, phama@webjockey.net,
Eric Botcazou <ebotcazou@libertysurf.fr>
Subject: Re: optimization/9052: in C code, "if" statement fails to execute
if optimized
Date: Wed, 12 Feb 2003 16:36:37 +0000
> > So in summary, almost certainly "not a bug".
>
> Pfewww, good.
>
> Still it is a change in behavior of the generated code. Should it be
> documented?
What would you document?
"Our optimizations are better than they used to be, so if your code is
broken, we're more likely to catch you out"?
In reality this is not much different from a expression like
x[i++] = y[i++] + 1;
It's ill-defined code, so anything can happen.
R.