diff options
author | Gavin Romig-Koch <gavin@cygnus.com> | 1999-07-02 10:30:01 +0000 |
---|---|---|
committer | Gavin Romig-Koch <gavin@gcc.gnu.org> | 1999-07-02 10:30:01 +0000 |
commit | 835f9b4dad11d84e385ea8fe8bba1b0e403f23f5 (patch) | |
tree | 5114691738cec02b4b8107a5fd681336bc2439d6 /gcc/cp/decl.c | |
parent | e75a9d77196ec059245f3baaff6cf249102ea5e5 (diff) | |
download | gcc-835f9b4dad11d84e385ea8fe8bba1b0e403f23f5.zip gcc-835f9b4dad11d84e385ea8fe8bba1b0e403f23f5.tar.gz gcc-835f9b4dad11d84e385ea8fe8bba1b0e403f23f5.tar.bz2 |
For gcc:
* c-decl.c (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
(init_decl_processing): Handle/use the two new types.
* c-common.c (type_for_size,type_for_mode) : Same.
* c-lex.c (yylex) : Same.
* c-typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
Same.
* c-tree.h (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
For gcc/cp:
* cp-tree.h (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
* decl.c (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
(init_decl_processing): Handle/use the two new types.
* lex.c (real_yylex): Same.
* typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
Same.
From-SVN: r27923
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b7a36de..1b6b268 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -220,6 +220,14 @@ tree unsigned_type_node; tree long_unsigned_type_node; tree long_long_unsigned_type_node; +/* These are used for integer literals that are larger than + a long long. The largest integer literals we can handle + are the width of two HOST_WIDE_INTs. If two HOST_WIDE_INTs + are not larger than the target's long long, then these + will never be used. */ +tree widest_integer_literal_type_node; +tree widest_unsigned_literal_type_node; + tree ptrdiff_type_node; tree unsigned_char_type_node; @@ -6356,6 +6364,15 @@ init_decl_processing () unsigned_char_type_node = make_unsigned_type (CHAR_TYPE_SIZE); record_builtin_type (RID_MAX, "unsigned char", unsigned_char_type_node); + /* Create the widest literal types. */ + widest_integer_literal_type_node = make_signed_type (HOST_BITS_PER_WIDE_INT * 2); + pushdecl (build_decl (TYPE_DECL, NULL_TREE, + widest_integer_literal_type_node)); + + widest_unsigned_literal_type_node = make_unsigned_type (HOST_BITS_PER_WIDE_INT * 2); + pushdecl (build_decl (TYPE_DECL, NULL_TREE, + widest_unsigned_literal_type_node)); + /* These are types that type_for_size and type_for_mode use. */ intQI_type_node = make_signed_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); |