summaryrefslogtreecommitdiffstats
path: root/test/Sema/scope-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/scope-check.c')
-rw-r--r--test/Sema/scope-check.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c
index 4d3f6cb..74bc7c4 100644
--- a/test/Sema/scope-check.c
+++ b/test/Sema/scope-check.c
@@ -181,15 +181,14 @@ void test11(int n) {
// TODO: When and if gotos are allowed in blocks, this should work.
void test12(int n) {
void *P = ^{
- goto L1; // expected-error {{goto not allowed in block literal}}
+ goto L1;
L1:
- goto L2; // expected-error {{goto not allowed in block literal}}
+ goto L2;
L2:
- goto L3; // expected-error {{goto not allowed in block literal}}
- // todo-error {{illegal goto into protected scope}}
- int Arr[n]; // todo-note {{jump bypasses initialization of variable length array}}
+ goto L3; // expected-error {{illegal goto into protected scope}}
+ int Arr[n]; // expected-note {{jump bypasses initialization of variable length array}}
L3:
- goto L4; // expected-error {{goto not allowed in block literal}}
+ goto L4;
L4: return;
};
}
OpenPOWER on IntegriCloud