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]

[Bug middle-end/58387] [4.9 Regression] wrong code at -Os and above on x86_64-linux-gnu (both 32-bit and 64-bit modes)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58387

--- Comment #17 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Fri, 13 Sep 2013, su at cs dot ucdavis.edu wrote:

> I noticed a stackoverflow discussion on this very topic: 
> 
> http://stackoverflow.com/questions/7961067/how-undefined-is-undefined-behavior 

That doesn't really seem to get into the distinction that in some cases 
where the C standard says something is undefined, what it says is 
undefined is a property of an execution of a program, while in some cases 
it's a property of the program itself.  In the case discussed there, the 
undefinedness is a property of an execution of the program, but in some 
cases (e.g. where one translation unit contains the declaration "extern 
int i;" and another contains "extern char i;") it's a property of the 
program.  You need to read the C standard carefully in each case to work 
out which it is.


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