This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20019] incorrect overflow warning


------- Additional Comments From neil at daikokuya dot co dot uk  2005-02-17 14:00 -------
Subject: Re:  incorrect overflow warning

schlie at comcast dot net wrote:-

> 
> ------- Additional Comments From schlie at comcast dot net  2005-02-17 13:20 -------
> (In reply to comment #6)
> > What should get a warning is the assignment of 0x80 to a char.
> 
> Not that either, as although the two differ in sign, the value does not exceed the type's precision.

I disagree.  Like so:

"/tmp/foo.c", line 1: warning: value changes sign during integer type
        conversion
char x = 0x80;
         ^


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]