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 11:34 -------
Subject: Re:  incorrect overflow warning

pinskia at gcc dot gnu dot org wrote:-

> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-17 03:14 -------
> No the warning is correct as char on a lot of targets is signed by default so promoting (char)0x80 to int 
> will give 0xFFFFFF80.

This explanation just doesn't make sense.

What should get a warning is the assignment of 0x80 to a char.

Neil.


-- 


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]