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

--- Comment #2 from John Regehr <regehr at cs dot utah.edu> 2011-03-18 20:04:04 
UTC ---
(In reply to comment #1)
>    x = (long)0 > ((unsigned int)0 ^ (signed short)0x8000);
>    x = (long)0 > ((unsigned)0 ^ (unsigned)0x8000);
> I think you missed something here (unsigned)(signed short) still sign extends.

Thanks Andrew, I'll look more closely.

If GCC is right, then Clang and Intel CC are wrong (assuming all three
compilers make the same implementation-dependent decisions for integers on
x86-64, which I was under the impression they did).

Reply via email to