From 734e01f0a3078bd798c1f32a62632916c9929f64 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 26 Sep 2011 13:51:52 +0000 Subject: [PATCH] re PR c++/26747 (bad break/continue is not detected until the gimplifier) 2011-09-26 Paolo Carlini PR c++/26747 * cp-gimplify.c (get_bc_label): Remove obsolete diagnostics. From-SVN: r179198 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/cp-gimplify.c | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cd309042f876..eb870c7bd71a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-26 Paolo Carlini + + PR c++/26747 + * cp-gimplify.c (get_bc_label): Remove obsolete diagnostics. + 2011-09-25 Jason Merrill * parser.c (inject_this_parameter): Split out from diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 6aeae75b0633..af45f5918468 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -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; -- 2.47.3