[Bug c/37642] GCC applies signed strict-overflow rules to unsigned short type

2008-09-24 Thread alexandre dot nunes at gmail dot com
--- Comment #1 from alexandre dot nunes at gmail dot com 2008-09-24 17:29 --- Created an attachment (id=16403) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16403action=view) This is the first testcase. compile with gcc -O2 -W -Wall -Wstrict-overflow=5 --

[Bug c/37642] GCC applies signed strict-overflow rules to unsigned short type

2008-09-24 Thread pinskia at gmail dot com
--- Comment #2 from pinskia at gmail dot com 2008-09-24 17:44 --- 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

[Bug c/37642] GCC applies signed strict-overflow rules to unsigned short type

2008-09-24 Thread alexandre dot nunes at gmail dot com
--- 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