C/C++ FEs: Do we really need three char_type_nodes?
Mark Mitchell
mark@codesourcery.com
Mon Sep 22 22:36:00 GMT 2008
Steven Bosscher wrote:
> + if (signed_char)
> + {
> + char_type_node = make_signed_type (CHAR_TYPE_SISE);
> + TYPE_CANONICAL (char_type_node) = signed_char_type_node;
> + }
I don't think this is a good idea. TYPE_CANONICAL is used for
type-comparison at the language level, and "char" and "signed char" are
different types -- even when "char" is signed.
For example:
char* q;
signed char *p = q;
is not valid without a cast.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc
mailing list