aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1996-09-27 17:49:57 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1996-09-27 17:49:57 +0000
commit9787ad71f1314110477fe5ee2f3f268f3dbb25dd (patch)
tree16b361efd79cd1a5c1dc5788bac8dc86d6a83a24
parent51c0d897d410385c872e663f3047fb69c8b171a3 (diff)
downloadgcc-9787ad71f1314110477fe5ee2f3f268f3dbb25dd.zip
gcc-9787ad71f1314110477fe5ee2f3f268f3dbb25dd.tar.gz
gcc-9787ad71f1314110477fe5ee2f3f268f3dbb25dd.tar.bz2
Allow short to be size_t
From-SVN: r12853
-rw-r--r--gcc/c-decl.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f1d3ba7..1eab9f3 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2868,6 +2868,14 @@ init_decl_processing ()
pushdecl (build_decl (TYPE_DECL, get_identifier ("long long unsigned int"),
long_long_unsigned_type_node));
+ short_integer_type_node = make_signed_type (SHORT_TYPE_SIZE);
+ pushdecl (build_decl (TYPE_DECL, get_identifier ("short int"),
+ short_integer_type_node));
+
+ short_unsigned_type_node = make_unsigned_type (SHORT_TYPE_SIZE);
+ pushdecl (build_decl (TYPE_DECL, get_identifier ("short unsigned int"),
+ short_unsigned_type_node));
+
/* `unsigned long' is the standard type for sizeof.
Traditionally, use a signed type.
Note that stddef.h uses `unsigned long',
@@ -2887,18 +2895,12 @@ init_decl_processing ()
TREE_TYPE (TYPE_SIZE (long_integer_type_node)) = sizetype;
TREE_TYPE (TYPE_SIZE (long_long_integer_type_node)) = sizetype;
TREE_TYPE (TYPE_SIZE (long_long_unsigned_type_node)) = sizetype;
+ TREE_TYPE (TYPE_SIZE (short_integer_type_node)) = sizetype;
+ TREE_TYPE (TYPE_SIZE (short_unsigned_type_node)) = sizetype;
error_mark_node = make_node (ERROR_MARK);
TREE_TYPE (error_mark_node) = error_mark_node;
- short_integer_type_node = make_signed_type (SHORT_TYPE_SIZE);
- pushdecl (build_decl (TYPE_DECL, get_identifier ("short int"),
- short_integer_type_node));
-
- short_unsigned_type_node = make_unsigned_type (SHORT_TYPE_SIZE);
- pushdecl (build_decl (TYPE_DECL, get_identifier ("short unsigned int"),
- short_unsigned_type_node));
-
/* Define both `signed char' and `unsigned char'. */
signed_char_type_node = make_signed_type (CHAR_TYPE_SIZE);
pushdecl (build_decl (TYPE_DECL, get_identifier ("signed char"),