[Bug c++/11919] int vs. typedef int bar/signedness of chars

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Thu Aug 14 14:27:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-14 14:27:29
               date|                            |
            Summary|int vs. typedef int bar     |int vs. typedef int
                   |                            |bar/signedness of chars


------- Additional Comments From bangerth at dealii dot org  2003-08-14 14:27 -------
Indeed, how odd. The use of a typedef should really not make any difference. 
 
The reason, BTW, is that "char" is really "unsigned char", so either call to foo requires 
a conversion of the argument, either to "signed char" or to "int". If c is declared as 
"signed char", no error happens. However, the fact that the use of a typedef over the 
actual type makes a difference is definitely an error. Previous versions of gcc as well 
as icc compile this just fine. 
 
W.



More information about the Gcc-bugs mailing list