]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 4 Jun 1999 03:45:57 +0000 (03:45 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 4 Jun 1999 03:45:57 +0000 (23:45 -0400)
* semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
(finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.

From-SVN: r27348

gcc/cp/ChangeLog
gcc/cp/semantics.c

index d59db6bf0fa2b8f0171b203e7e4202ae9732968e..a8027ba694114c2e16eba18c15e5f318f318b5f9 100644 (file)
@@ -1,3 +1,8 @@
+1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
+       (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
+
 1999-06-04  Nathan Sidwell  <nathan@acm.org>
 
        * except.c (build_throw): Check throw expression validity.
index 37fb9da07d21ab075d6b83368eaac22d37359bfd..ee6b99b3f2007581cd72e164a97c15772217bb8e 100644 (file)
@@ -120,7 +120,7 @@ finish_if_stmt_cond (cond, if_stmt)
       if (last_tree != if_stmt)
        RECHAIN_STMTS_FROM_LAST (if_stmt, IF_COND (if_stmt));
       else
-       IF_COND (if_stmt) = cond;
+       IF_COND (if_stmt) = copy_to_permanent (cond);
     }
   else
     {
@@ -219,7 +219,7 @@ finish_while_stmt_cond (cond, while_stmt)
        RECHAIN_STMTS_FROM_LAST (while_stmt, 
                                      WHILE_COND (while_stmt)); 
       else
-       TREE_OPERAND (while_stmt, 0) = cond;
+       TREE_OPERAND (while_stmt, 0) = copy_to_permanent (cond);
     }
   else
     {
@@ -294,7 +294,7 @@ finish_do_stmt (cond, do_stmt)
      tree do_stmt;
 {
   if (processing_template_decl)
-    DO_COND (do_stmt) = cond;
+    DO_COND (do_stmt) = copy_to_permanent (cond);
   else
     {
       emit_line_note (input_filename, lineno);
@@ -378,7 +378,7 @@ finish_for_cond (cond, for_stmt)
       if (last_tree != for_stmt)
        RECHAIN_STMTS_FROM_LAST (for_stmt, FOR_COND (for_stmt));
       else
-       FOR_COND (for_stmt) = cond;
+       FOR_COND (for_stmt) = copy_to_permanent (cond);
     }
   else
     {