This is the mail archive of the
gcc-bugs@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: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: Richard dot Earnshaw at arm dot com, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, phama at webjockey dot net, Eric Botcazou <ebotcazou at libertysurf dot fr>
- Date: Wed, 12 Feb 2003 16:36:37 +0000
- Subject: Re: optimization/9052: in C code, "if" statement fails to execute if optimized
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > 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.