diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28e261605e2..ad825fc52fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-05-02 Zdenek Dvorak + + * tree.c (unsigned_type_for, signed_type_for): Make sure a type + of the correct signedness is returned. + 2006-05-02 Jeff Law PR tree-optimization/27364 diff --git a/gcc/tree.c b/gcc/tree.c index 48b4c655faa..81803481710 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -6990,7 +6990,7 @@ tree unsigned_type_for (tree type) { if (POINTER_TYPE_P (type)) - return size_type_node; + return lang_hooks.types.unsigned_type (size_type_node); return lang_hooks.types.unsigned_type (type); } @@ -6999,6 +6999,8 @@ unsigned_type_for (tree type) tree signed_type_for (tree type) { + if (POINTER_TYPE_P (type)) + return lang_hooks.types.signed_type (size_type_node); return lang_hooks.types.signed_type (type); }