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.

Reply via email to