This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]