This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ PATCH: Misc changes



This patch contains three patchlets:

  o Change STMT_EXPR processing to set RTL_EXPR_HAS_NO_SCOPE.
  o Clear TI_PENDING_TEMPLATE_FLAG a little later to avoid nasty
    recursive inlining cases.
  o Dump SCOPE_NO_CLEANUPS_P in the tree dump.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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.

Index: dump.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/dump.c,v
retrieving revision 1.35
diff -c -p -r1.35 dump.c
*** dump.c	2000/02/27 02:46:57	1.35
--- dump.c	2000/03/05 20:37:52
*************** dequeue_and_dump (di)
*** 768,773 ****
--- 768,775 ----
  	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: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/expr.c,v
retrieving revision 1.43
diff -c -p -r1.43 expr.c
*** expr.c	2000/02/27 21:39:38	1.43
--- expr.c	2000/03/05 20:37:52
*************** cplus_expand_expr (exp, target, tmode, m
*** 145,153 ****
  
      case STMT_EXPR:
        {
! 	tree rtl_expr = begin_stmt_expr ();
  	expand_stmt (STMT_EXPR_STMT (exp));
! 	finish_stmt_expr (rtl_expr);
  	return expand_expr (rtl_expr, target, tmode, modifier);
        }
        break;
--- 145,154 ----
  
      case STMT_EXPR:
        {
! 	tree rtl_expr = expand_start_stmt_expr ();
  	expand_stmt (STMT_EXPR_STMT (exp));
! 	expand_end_stmt_expr (rtl_expr);
! 	RTL_EXPR_HAS_NO_SCOPE (rtl_expr) = 1;
  	return expand_expr (rtl_expr, target, tmode, modifier);
        }
        break;
Index: pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.402
diff -c -p -r1.402 pt.c
*** pt.c	2000/03/03 02:27:15	1.402
--- pt.c	2000/03/05 20:37:58
*************** instantiate_decl (d)
*** 9569,9577 ****
       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);
--- 9569,9574 ----
*************** instantiate_decl (d)
*** 9610,9615 ****
--- 9607,9615 ----
        /* Finish the function.  */
        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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]