We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cf824 commit 6ce2e01Copy full SHA for 6ce2e01
clang/test/Sema/warn-jump-bypasses-init.c
@@ -45,3 +45,16 @@ void f(void) {
45
ouch:
46
;
47
}
48
+
49
+void indirect(int n) {
50
+DirectJump:
51
+ ;
52
53
+ void *Table[] = {&&DirectJump, &&Later};
54
+ goto *Table[n]; // c-warning {{jump from this indirect goto statement to one of its possible targets is incompatible with C++}} \
55
+ cxx-error {{cannot jump from this indirect goto statement to one of its possible targets}}
56
57
+ int x = 12; // both-note {{jump bypasses variable initialization}}
58
+Later: // both-note {{possible target of indirect goto statement}}
59
60
+}
0 commit comments