News for hackers. Stuff that matters.
Re:A glimpse of undefined behavior in C by mmariani on Saturday November 30, 2013 @03:37PM (#6824514)
I just ran this after compiling it with clang-500.2.79 based on LLVM 3.3svn, and the output was 140. Maybe GCC is to blame?
Re:A glimpse of undefined behavior in C by hbar on Saturday November 30, 2013 @03:55PM (#6824579)
It's undefined in the spec. So GCC and clang are both correct.
Re:A glimpse of undefined behavior in C by steveklabnik on Saturday November 30, 2013 @03:51PM (#6824564)
It's undefined behaviour, so you won't get a consistent answer.