diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/c-common.h | 2 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 4 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 9 | ||||
-rw-r--r-- | gcc/tree.h | 9 |
8 files changed, 32 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3498c50..38524d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2001-01-10 Mark Mitchell <mark@codesourcery.com> + + * c-common.h (CTI_VOID_LIST): Remove. + (void_list_node): Likewise. + * tree.h (TI_VOID_LIST_NODE): New enumeral. + (void_list_node): New macro. + * config/arm/arm.c (arm_init_builtins): Use void_list_node. + * config/i386/i386.c (ix86_init_builtins): Likewise. + * config/ia64a/ia64.c (ia64_init_builtins): Likewise. + 2001-01-10 Neil Booth <neil@daikokuya.demon.co.uk> * Makefile.in (tradcpp0): Depend on mkdeps.h. Link mkdeps.o diff --git a/gcc/c-common.h b/gcc/c-common.h index adee309..9ea2c63 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -143,7 +143,6 @@ enum c_tree_index CTI_C_BOOL_TRUE, CTI_C_BOOL_FALSE, CTI_DEFAULT_FUNCTION_TYPE, - CTI_VOID_LIST, CTI_VOID_FTYPE, CTI_VOID_FTYPE_PTR, @@ -192,7 +191,6 @@ enum c_tree_index #define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE] #define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE] -#define void_list_node c_global_trees[CTI_VOID_LIST] #define void_ftype c_global_trees[CTI_VOID_FTYPE] #define void_ftype_ptr c_global_trees[CTI_VOID_FTYPE_PTR] #define int_ftype_int c_global_trees[CTI_INT_FTYPE_INT] diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a2f40c0..30335db 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8794,7 +8794,7 @@ arm_init_builtins () front-end that causes a failure while building libstdc++-v3. When that bug is fixed, this code can be re-enabled. */ - tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE); + tree endlink = void_list_node; tree int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink); tree pchar_type_node = build_pointer_type (char_type_node); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 217426b..72dbb9a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7427,7 +7427,7 @@ ix86_init_builtins () { struct builtin_description * d; int i; - tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE); + tree endlink = void_list_node; tree pchar_type_node = build_pointer_type (char_type_node); tree pfloat_type_node = build_pointer_type (float_type_node); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 14948b0..5488869 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by James E. Wilson <wilson@cygnus.com> and David Mosberger <davidm@hpl.hp.com>. @@ -6454,7 +6454,7 @@ ia64_init_builtins () { tree psi_type_node = build_pointer_type (integer_type_node); tree pdi_type_node = build_pointer_type (long_integer_type_node); - tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE); + tree endlink = void_list_node; /* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */ tree si_ftype_psi_si_si diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 5c806ce..2c22954 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -61,6 +61,7 @@ Boston, MA 02111-1307, USA. */ ICS_THIS_FLAG (in _CONV) BINDING_HAS_LEVEL_P (in CPLUS_BINDING) BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P (in BINFO) + TREE_PARMLIST (in TREE_LIST) 3: TYPE_USES_VIRTUAL_BASECLASSES (in a class TYPE). BINFO_VTABLE_PATH_MARKED. BINFO_PUSHDECLS_MARKED. @@ -1755,7 +1756,7 @@ struct lang_type /* Nonzero for TREE_LIST node means that this list of things is a list of parameters, as opposed to a list of expressions. */ -#define TREE_PARMLIST(NODE) ((NODE)->common.unsigned_flag) /* overloaded! */ +#define TREE_PARMLIST(NODE) (TREE_LANG_FLAG_2 (NODE)) /* Nonzero for a parmlist means that this parmlist ended in ... */ #define PARMLIST_ELLIPSIS_P(NODE) TREE_LANG_FLAG_0 (NODE) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a6a9381..b8bd02e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6449,8 +6449,13 @@ tsubst (t, args, complain, in_decl) && value == TREE_VALUE (t) && chain == TREE_CHAIN (t)) return t; - result = hash_tree_cons (purpose, value, chain); - TREE_PARMLIST (result) = TREE_PARMLIST (t); + if (TREE_PARMLIST (t)) + { + result = tree_cons (purpose, value, chain); + TREE_PARMLIST (result) = 1; + } + else + result = hash_tree_cons (purpose, value, chain); return result; } case TREE_VEC: @@ -1739,6 +1739,8 @@ enum tree_index TI_PTRDIFF_TYPE, TI_VA_LIST_TYPE, + TI_VOID_LIST_NODE, + TI_V4SF_TYPE, TI_V4SI_TYPE, TI_V8QI_TYPE, @@ -1793,6 +1795,13 @@ extern tree global_trees[TI_MAX]; #define ptrdiff_type_node global_trees[TI_PTRDIFF_TYPE] #define va_list_type_node global_trees[TI_VA_LIST_TYPE] +/* The node that should be placed at the end of a parameter list to + indicate that the function does not take a variable number of + arguments. The TREE_VALUE will be void_type_node and there will be + no TREE_CHAIN. Language-independent code should not assume + anything else about this node. */ +#define void_list_node global_trees[TI_VOID_LIST_NODE] + #define main_identifier_node global_trees[TI_MAIN_IDENTIFIER] #define MAIN_NAME_P(NODE) (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node) |