[clang] [Clang] Add -Wtrivial-auto-var-init warning for unreachable variables (PR #178318)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 5 18:07:09 PST 2026
efriedma-quic wrote:
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114457 .
It looks like computed goto doesn't work, but I guess that's not too surprising.
```
void use(int*);
void switch_precase(int c) {
void *p = &&INDIRECT;
goto *p;
int x;
INDIRECT:
use(&x);
goto *p;
}
```
https://github.com/llvm/llvm-project/pull/178318
More information about the cfe-commits
mailing list