Makefile.in (parse.o, decl.o): Also depend on $(srcdir)/../except.h $(srcdir)/.....
[gcc.git] / gcc / cp / expr.c
index 8aa142d12ff270165950e18c5c42230a4341a25f..a14695ddd51ff03fbc4c2e829d88f9b526fbc967 100644 (file)
@@ -21,15 +21,21 @@ Boston, MA 02111-1307, USA.  */
 
 
 #include "config.h"
+#include <stdio.h>
 #include "rtl.h"
 #include "tree.h"
 #include "flags.h"
 #include "expr.h"
 #include "cp-tree.h"
 
+static tree extract_aggr_init PROTO((tree, tree));
+static tree extract_scalar_init PROTO((tree, tree));
+static rtx cplus_expand_expr PROTO((tree, rtx, enum machine_mode,
+                                   enum expand_modifier));
+
 /* Hook used by expand_expr to expand language-specific tree codes.  */
 
-rtx
+static rtx
 cplus_expand_expr (exp, target, tmode, modifier)
      tree exp;
      rtx target;
@@ -39,11 +45,10 @@ cplus_expand_expr (exp, target, tmode, modifier)
   tree type = TREE_TYPE (exp);
   register enum machine_mode mode = TYPE_MODE (type);
   register enum tree_code code = TREE_CODE (exp);
-  rtx original_target = target;
   int ignore = target == const0_rtx;
 
   if (ignore)
-    target = 0, original_target = 0;
+    target = 0;
 
   /* No sense saving up arithmetic to be done
      if it's all in the wrong mode to form part of an address.
@@ -329,8 +334,8 @@ extract_scalar_init (decl, init)
 
       to = XEXP (r, 0);
 
-      if (! (to == value ||
-            (GET_CODE (to) == SUBREG && XEXP (to, 0) == value)))
+      if (! (to == value
+            || (GET_CODE (to) == SUBREG && XEXP (to, 0) == value)))
        return 0;
 
       r = XEXP (r, 1);
@@ -445,6 +450,8 @@ do_case (start, end)
        {
          if (end)
            error ("case label within scope of cleanup or variable array");
+         else if (! start)
+           error ("`default' label within scope of cleanup or variable array");
          else
            cp_error ("case label `%E' within scope of cleanup or variable array", start);
        }