This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11919] int vs. typedef int bar/signedness of chars
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2003 14:27:29 -0000
- Subject: [Bug c++/11919] int vs. typedef int bar/signedness of chars
- References: <20030814122446.11919.hans.utz@informatik.uni-ulm.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.