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 c/60578] wrong code (that hangs) at -O0 on x86_64-linux-gnu (affecting all gcc versions)


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

--- Comment #3 from Zhendong Su <su at cs dot ucdavis.edu> ---
> (because (c ^ 0L) < -1 is true in 64-bit, so the code returns)

Or perhaps not, as -1 should actually be promoted to signed long, so the
comparison becomes 0L < -1L, and is thus false and triggers the undefined
behavior?


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