OSDN Git Service

* expr.c (cplus_expand_expr, case STMT_EXPR): Use
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 5 Mar 2000 20:46:18 +0000 (20:46 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 5 Mar 2000 20:46:18 +0000 (20:46 +0000)
expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
RTL_EXPR_HAS_NO_SCOPE.

* pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
later.

* dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.

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

gcc/cp/ChangeLog
gcc/cp/dump.c
gcc/cp/expr.c
gcc/cp/pt.c

index 2213278..d1f5473 100644 (file)
@@ -1,3 +1,14 @@
+2000-03-05  Mark Mitchell  <mark@codesourcery.com>
+
+       * expr.c (cplus_expand_expr, case STMT_EXPR): Use
+       expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
+       RTL_EXPR_HAS_NO_SCOPE.
+
+       * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
+       later.
+       
+       * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
+
 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
 
        * call.c (convert_like): Macrofy.
index dc8f754..c8152d5 100644 (file)
@@ -768,6 +768,8 @@ dequeue_and_dump (di)
        dump_string (di, "end");
       if (SCOPE_NULLIFIED_P (t))
        dump_string (di, "null");
+      if (!SCOPE_NO_CLEANUPS_P (t))
+       dump_string (di, "clnp");
       dump_next_stmt (di, t);
       break;
 
index 05411e3..f835181 100644 (file)
@@ -145,9 +145,10 @@ cplus_expand_expr (exp, target, tmode, modifier)
 
     case STMT_EXPR:
       {
-       tree rtl_expr = begin_stmt_expr ();
+       tree rtl_expr = expand_start_stmt_expr ();
        expand_stmt (STMT_EXPR_STMT (exp));
-       finish_stmt_expr (rtl_expr);
+       expand_end_stmt_expr (rtl_expr);
+       RTL_EXPR_HAS_NO_SCOPE (rtl_expr) = 1;
        return expand_expr (rtl_expr, target, tmode, modifier);
       }
       break;
index e6e079c..b9d4627 100644 (file)
@@ -9569,9 +9569,6 @@ instantiate_decl (d)
      try to instantiate it again.  */
   DECL_TEMPLATE_INSTANTIATED (d) = 1;
 
-  /* And we're not deferring instantiation any more.  */
-  TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0;
-
   /* Regenerate the declaration in case the template has been modified
      by a subsequent redeclaration.  */
   regenerate_decl_from_template (d, td);
@@ -9611,6 +9608,9 @@ instantiate_decl (d)
       expand_body (finish_function (lineno, 0));
     }
 
+  /* We're not deferring instantiation any more.  */
+  TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0;
+
 out:
   lineno = line;
   input_filename = file;