summaryrefslogtreecommitdiff
path: root/test/Parser/bad-control.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/bad-control.c')
-rw-r--r--test/Parser/bad-control.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Parser/bad-control.c b/test/Parser/bad-control.c
index 480d81be0d571..72614eb2551e7 100644
--- a/test/Parser/bad-control.c
+++ b/test/Parser/bad-control.c
@@ -7,3 +7,18 @@ void foo() {
void foo2() {
continue; /* expected-error {{'continue' statement not in loop statement}} */
}
+
+int pr8880_9 (int first) {
+ switch(({ if (first) { first = 0; break; } 1; })) { // expected-error {{'break' statement not in loop or switch statement}}
+ case 2: return 2;
+ default: return 0;
+ }
+}
+
+void pr8880_24() {
+ for (({break;});;); // expected-error {{'break' statement not in loop or switch statement}}
+}
+
+void pr8880_25() {
+ for (({continue;});;); // expected-error {{'continue' statement not in loop statement}}
+}