tree.c (copy_node): Remove documentation about obstacks.
authorMark Mitchell <mark@codesourcery.com>
Thu, 4 Jan 2001 19:01:22 +0000 (19:01 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 4 Jan 2001 19:01:22 +0000 (19:01 +0000)
* tree.c (copy_node): Remove documentation about obstacks.
(buidl1): Check that nobody tries to build 2-argument nodes this
way.

* call.c (build_conv): Don't use build1 for USER_CONV.
* pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.

From-SVN: r38686

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/tree.c

index 6d5ce8b27c2bfd8f3e941dfd6726ce6774b380e5..c6992fcb24fe8885eac42cff819e65d11a05101c 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-04  Mark Mitchell  <mark@codesourcery.com>
+
+       * tree.c (copy_node): Remove documentation about obstacks.
+       (buidl1): Check that nobody tries to build 2-argument nodes this
+       way.
+
 2001-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * sparc.h (PREDICATE_CODES): Delete fp_sethi_p, fp_mov_p and
index 7404a1a001bab24ffaf8783cc2835c2d31c471b4..e86de6119cb8f2e4f2d16f7a33e8a893a459d3fc 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-04  Mark Mitchell  <mark@codesourcery.com>
+
+       * call.c (build_conv): Don't use build1 for USER_CONV.
+       * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
+
 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * lex.c (lang_init): Call c_common_lang_init.
index a836b99ea2aa13b568329324c9c2b8744658c0e6..865aacd6e6a3d48fe88d46efb638da5775d1721b 100644 (file)
@@ -469,10 +469,7 @@ make_lang_type (code)
 }
 \f
 /* Return a new node with the same contents as NODE except that its
-   TREE_CHAIN is zero and it has a fresh uid.  Unlike make_node, this
-   function always performs the allocation on the CURRENT_OBSTACK;
-   it's up to the caller to pick the right obstack before calling this
-   function.  */
+   TREE_CHAIN is zero and it has a fresh uid.  */
 
 tree
 copy_node (node)
@@ -2424,6 +2421,13 @@ build1 (code, type, node)
     kind = e_kind;
 #endif
 
+#ifdef ENABLE_CHECKING
+  if (TREE_CODE_CLASS (code) == '2' 
+      || TREE_CODE_CLASS (code) == '<'
+      || TREE_CODE_LENGTH (code) != 1)
+    abort ();
+#endif /* ENABLE_CHECKING */
+
   length = sizeof (struct tree_exp);
 
   t = ggc_alloc_tree (length);