This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46374] Add nooverflow attribute
- 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: Mon, 8 Nov 2010 15:41:33 +0000
- Subject: [Bug c/46374] Add nooverflow attribute
- Auto-submitted: auto-generated
- References: <bug-46374-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46374
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-11-08 15:41:30 UTC ---
That code is really:
bool
f (uint16_t x, uint16_t y)
{
return ((int)x) + 8 == ((int)y) - 17;
}
--- CUT ---
There should be no zero extends in that code because the ABI requires them to
be zero extended already. If there is then that is the bug and really a
nooverflow attribute is not required there.