aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2006-05-02 21:59:21 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2006-05-02 19:59:21 +0000
commita3428e070102b16998dacc499781306137b9f787 (patch)
treee75b3e5343c9cf07d5e001c34a20ee2b833db32e /gcc/tree.c
parent26ef43017a241c551c893b3d0da3282c68b989fe (diff)
downloadgcc-a3428e070102b16998dacc499781306137b9f787.zip
gcc-a3428e070102b16998dacc499781306137b9f787.tar.gz
gcc-a3428e070102b16998dacc499781306137b9f787.tar.bz2
tree.c (unsigned_type_for, [...]): Make sure a type of the correct signedness is returned.
* tree.c (unsigned_type_for, signed_type_for): Make sure a type of the correct signedness is returned. From-SVN: r113482
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 3 insertions, 1 deletions
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);
}