OSDN Git Service

1999-11-25 Mark Mitchell <mark@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / expr.c
index 9556cac..094ba50 100644 (file)
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 #include "cp-tree.h"
 #include "toplev.h"
 #include "except.h"
+#include "tm_p.h"
 
 #if 0
 static tree extract_aggr_init PROTO((tree, tree));
@@ -233,6 +234,10 @@ cplus_expand_expr (exp, target, tmode, modifier)
       expand_internal_throw ();
       return NULL;
 
+    case EMPTY_CLASS_EXPR:
+      /* We don't need to generate any code for an empty class.  */
+      return const0_rtx;
+
     case STMT_EXPR:
       {
        tree rtl_expr = begin_stmt_expr ();
@@ -306,14 +311,12 @@ extract_scalar_init (decl, init)
   extern struct obstack temporary_obstack;
   tree t = NULL_TREE;
 
-  push_obstacks (&temporary_obstack, &temporary_obstack);
   start_sequence ();
   value = expand_expr (init, NULL_RTX, VOIDmode, 0);
   insns = get_insns ();
   end_sequence ();
   reg_scan (insns, max_reg_num (), 0);
   jump_optimize (insns, 0, 0, 1);
-  pop_obstacks ();
 
   for (insn = insns; insn; insn = NEXT_INSN (insn))
     {