[clang] [C] Add -Wjump-bypasses-init (PR #138009)
Arthur Eubanks via cfe-commits
cfe-commits at lists.llvm.org
Fri May 2 13:03:26 PDT 2025
aeubanks wrote:
this causes a `-Wmicrosoft-goto` warning on
```
$ cat /tmp/a.c
void f() {
goto l;
int i = 0;
l:
}
$ bin/clang-cl /c /tmp/a.c
...
/tmp/a.c(2,2): warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]
2 | goto l;
| ^
/tmp/a.c(3,6): note: jump bypasses variable initialization
3 | int i = 0;
| ^
```
where there was none previously. is this intended?
https://github.com/llvm/llvm-project/pull/138009
More information about the cfe-commits
mailing list