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++/11919] int vs. typedef int bar/signedness of chars


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.


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