On Fri, Sep 19, 2008 at 6:36 PM, Diego Novillo <[EMAIL PROTECTED]> wrote:
> @@ -7674,12 +7713,8 @@ build_common_tree_nodes (bool signed_cha
> unsigned_char_type_node = make_unsigned_type (CHAR_TYPE_SIZE);
> TYPE_STRING_FLAG (unsigned_char_type_node) = 1;
>
> - /* Define `char', which is like either `signed char' or `unsigned char'
> - but not the same as either. */
> - char_type_node
> - = (signed_char
> - ? make_signed_type (CHAR_TYPE_SIZE)
> - : make_unsigned_type (CHAR_TYPE_SIZE));
> + /* Define `char', which is like either `signed char' or `unsigned char'.
> */
> + char_type_node = signed_char ? signed_char_type_node :
> unsigned_char_type_node;
> TYPE_STRING_FLAG (char_type_node) = 1;
Maybe this is a totally stupid idea in the wrong direction - but would
it help to set the TYPE_CANONICAL the same, e.g.:
Index: tree.c
===================================================================
--- tree.c (revision 140524)
+++ tree.c (working copy)
@@ -7364,8 +7364,8 @@
but not the same as either. */
char_type_node
= (signed_char
- ? make_signed_type (CHAR_TYPE_SIZE)
- : make_unsigned_type (CHAR_TYPE_SIZE));
+ ? build_distinct_type_copy (signed_char_type_node)
+ : build_distinct_type_copy (unsigned_char_type_node));
TYPE_STRING_FLAG (char_type_node) = 1;
short_integer_type_node = make_signed_type (SHORT_TYPE_SIZE);
Gr.
Steven