aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 28e2616..ad825fc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-02 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * tree.c (unsigned_type_for, signed_type_for): Make sure a type
+ of the correct signedness is returned.
+
2006-05-02 Jeff Law <law@redhat.com>
PR tree-optimization/27364
diff --git a/gcc/tree.c b/gcc/tree.c
index 48b4c65..8180348 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);
}