This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37642] GCC applies signed strict-overflow rules to unsigned short type
- From: "alexandre dot nunes at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2008 20:42:40 -0000
- Subject: [Bug c/37642] GCC applies signed strict-overflow rules to unsigned short type
- References: <bug-37642-15246@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from alexandre dot nunes at gmail dot com 2008-09-24 20:42 -------
(In reply to comment #2)
> Subject: Re: New: GCC applies signed strict-overflow rules to unsigned short
> type
>
> When doing addition unsigned short is promoted to an signed int. So
> this is not a bug. That is unsigned short + 1 is a signed int since 1
> is a signed int.
>
> Sent from my iPhone
>
Hah, living and learning. That actually makes sense, thanks, I'll refine the
test.
--
alexandre dot nunes at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37642