optimization/9052: in C code, "if" statement fails to execute if optimized

Richard Earnshaw rearnsha@arm.com
Wed Feb 12 16:37:00 GMT 2003


> > 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.



More information about the Gcc-bugs mailing list