aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-06-26 11:15:29 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-06-26 11:15:29 -0400
commita34731a692bd64bccddb7416c3dd3cfcef838d76 (patch)
treeb05472f0e26bf960e7b2601f4e884305c9baec84 /gcc
parent4b63dccb38fdde8ad0dc37666194570ff043126c (diff)
downloadgcc-a34731a692bd64bccddb7416c3dd3cfcef838d76.zip
gcc-a34731a692bd64bccddb7416c3dd3cfcef838d76.tar.gz
gcc-a34731a692bd64bccddb7416c3dd3cfcef838d76.tar.bz2
(init_decl_processing): When making SIZETYPE, start with name in SIZE_TYPE.
(init_decl_processing): When making SIZETYPE, start with name in SIZE_TYPE. If -traditional, use a signed version of that type, if it is unsigned. From-SVN: r4752
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d7001b9..11447e4 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1,5 +1,5 @@
/* Process declarations and variables for C compiler.
- Copyright (C) 1988, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2615,11 +2615,10 @@ init_decl_processing ()
Traditionally, use a signed type.
Note that stddef.h uses `unsigned long',
and this must agree, even of long and int are the same size. */
- if (flag_traditional)
- sizetype = long_integer_type_node;
- else
- sizetype
- = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE)));
+ sizetype
+ = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE)));
+ if (flag_traditional && TREE_UNSIGNED (sizetype))
+ sizetype = signed_type (sizetype);
ptrdiff_type_node
= TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (PTRDIFF_TYPE)));