This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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)
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Sep 2013 16:25:52 +0000
- Subject: [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)
- Auto-submitted: auto-generated
- References: <bug-58387-4 at http dot gcc dot gnu dot org/bugzilla/>
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.