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 c3dc933 commit 65cf824Copy full SHA for 65cf824
clang/test/Sema/warn-jump-bypasses-init.c
@@ -29,3 +29,19 @@ void switch_func(int i) {
29
break;
30
}
31
32
+
33
+// Statement expressions are a bit strange in that they seem to allow for
34
+// jumping past initialization without being diagnosed, even in C++. Perhaps
35
+// this should change?
36
+void f(void) {
37
+ ({
38
+ goto ouch;
39
+ int i = 12;
40
+ });
41
42
+ for (int i = ({ goto ouch; int x = 10; x;}); i < 0; ++i) {
43
+ }
44
45
+ouch:
46
+ ;
47
+}
0 commit comments