This is the mail archive of the gcc-prs@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


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.
 


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