This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48197] possible wrong code bug at -O0
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Mar 2011 19:56:57 +0000
- Subject: [Bug c/48197] possible wrong code bug at -O0
- Auto-submitted: auto-generated
- References: <bug-48197-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48197
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-18 19:56:42 UTC ---
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.