* c-common.h (CTI_VOID_LIST): Remove.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2001 00:08:45 +0000 (00:08 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2001 00:08:45 +0000 (00:08 +0000)
(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.

* class.c (finish_struct_1):  Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38887 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.h
gcc/config/arm/arm.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/tree.h

index 3498c50..38524d0 100644 (file)
@@ -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
index adee309..9ea2c63 100644 (file)
@@ -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]
index a2f40c0..30335db 100644 (file)
@@ -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);
 
index 217426b..72dbb9a 100644 (file)
@@ -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);
index 14948b0..5488869 100644 (file)
@@ -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
index 5c806ce..2c22954 100644 (file)
@@ -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
 \f
 /* 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)
index a6a9381..b8bd02e 100644 (file)
@@ -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:
index 5e8a1a1..60f787e 100644 (file)
@@ -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)