Hi,

as analyzed in the audit trail, it's pretty sure that this check in get_bc_label is not serving any purpose anymore, because such diagnostics is always (eg, also with -fsyntax-only, double checked) produced by the parser. Thus I tested the below on x86_64-linux.

Ok for mainline?

Thanks,
Paolo.

///////////////////
2011-09-26  Paolo Carlini  <paolo.carl...@oracle.com>

        PR c++/26747
        * cp-gimplify.c (get_bc_label): Remove obsolete diagnostics.
Index: cp-gimplify.c
===================================================================
--- cp-gimplify.c       (revision 179187)
+++ cp-gimplify.c       (working copy)
@@ -86,16 +86,6 @@ get_bc_label (enum bc_t bc)
 {
   tree label = bc_label[bc];
 
-  if (label == NULL_TREE)
-    {
-      if (bc == bc_break)
-       error ("break statement not within loop or switch");
-      else
-       error ("continue statement not within loop or switch");
-
-      return NULL_TREE;
-    }
-
   /* Mark the label used for finish_bc_block.  */
   TREE_USED (label) = 1;
   return label;

Reply via email to