diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-01 22:25:43 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-01 22:25:43 +0000 |
commit | 6bf5ed8d9c7340ed0e889dfaa573a5972ab15feb (patch) | |
tree | 129bd88e5e40aaabb1457a5c0c01dbdb748db7d1 /gcc/c-decl.c | |
parent | 47fd39d96cacb934b889809548b68b9405952dc7 (diff) | |
download | gcc-6bf5ed8d9c7340ed0e889dfaa573a5972ab15feb.tar.gz |
* c-common.c: Include "defaults.h".
(WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Define.
(c_common_nodes_and_builtins): Create string_type_node,
const_string_type_node, wint_type_node, intmax_type_node,
uintmax_type_node, default_function_type, ptrdiff_type_node and
unsigned_ptrdiff_type_node.
* c-common.h (identifier_global_value): Declare.
* c-decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
(init_decl_processing): Don't create string_type_node,
const_string_type_node, wint_type_node, intmax_type_node,
uintmax_type_node, default_function_type, ptrdiff_type_node and
unsigned_ptrdiff_type_node.
(identifier_global_value): New function.
cp:
* decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
(init_decl_processing): Don't create string_type_node,
const_string_type_node, wint_type_node, intmax_type_node,
uintmax_type_node, default_function_type, ptrdiff_type_node and
unsigned_ptrdiff_type_node. Adjust position of call to
c_common_nodes_and_builtins.
(identifier_global_value): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37931 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 135163947a2..e7c5988fb1e 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -70,25 +70,6 @@ enum decl_context #define WCHAR_TYPE "int" #endif -#ifndef WINT_TYPE -#define WINT_TYPE "unsigned int" -#endif - -#ifndef INTMAX_TYPE -#define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "int" \ - : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "long int" \ - : "long long int")) -#endif - -#ifndef UINTMAX_TYPE -#define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "unsigned int" \ - : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "long unsigned int" \ - : "long long unsigned int")) -#endif /* Nonzero if we have seen an invalid cross reference to a struct, union, or enum, but not yet printed the message. */ @@ -3081,14 +3062,6 @@ init_decl_processing () signed_wchar_type_node = signed_type (wchar_type_node); unsigned_wchar_type_node = unsigned_type (wchar_type_node); - wint_type_node = - TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (WINT_TYPE))); - - intmax_type_node = - TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (INTMAX_TYPE))); - uintmax_type_node = - TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (UINTMAX_TYPE))); - boolean_type_node = integer_type_node; boolean_true_node = integer_one_node; boolean_false_node = integer_zero_node; @@ -3106,10 +3079,6 @@ init_decl_processing () c_bool_true_node = build_int_2 (1, 0); TREE_TYPE (c_bool_true_node) = c_bool_type_node; - string_type_node = build_pointer_type (char_type_node); - const_string_type_node - = build_pointer_type (build_type_variant (char_type_node, 1, 0)); - /* Make a type to be the domain of a few array types whose domains don't really matter. 200 is small enough that it always fits in size_t @@ -3132,11 +3101,6 @@ init_decl_processing () void_list_node = tree_cons (NULL_TREE, void_type_node, NULL_TREE); - default_function_type = build_function_type (integer_type_node, NULL_TREE); - ptrdiff_type_node - = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (PTRDIFF_TYPE))); - unsigned_ptrdiff_type_node = unsigned_type (ptrdiff_type_node); - c_common_nodes_and_builtins (); endlink = void_list_node; @@ -7203,3 +7167,13 @@ c_expand_decl_stmt (t) && DECL_SAVED_TREE (decl)) c_expand_body (decl, /*nested_p=*/1); } + +/* Return the IDENTIFIER_GLOBAL_VALUE of T, for use in common code, since + the definition of IDENTIFIER_GLOBAL_VALUE is different for C and C++. */ + +tree +identifier_global_value (t) + tree t; +{ + return IDENTIFIER_GLOBAL_VALUE (t); +} |