diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2025-05-02 09:06:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-02 09:06:31 -0400 |
commit | 543f112e148a81de290d099f10784dc3ff698aa4 (patch) | |
tree | 989ad78987dbbb3be3d5eefa38ec0f32cd3a8cad /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 7d01b85c2a0aa8bc91f731cfeb2a7b6885b8d04a (diff) | |
download | llvm-543f112e148a81de290d099f10784dc3ff698aa4.zip llvm-543f112e148a81de290d099f10784dc3ff698aa4.tar.gz llvm-543f112e148a81de290d099f10784dc3ff698aa4.tar.bz2 |
[C] Add -Wjump-bypasses-init (#138009)
We already diagnose when a jump bypasses initialization in C++ because
such code is ill-formed there. However, we were not using this to
diagnose those same jumps in C.
-Wjump-bypasses-init is grouped under -Wc++-compat and diagnoses this
situation as a compatibility issue with C++. This diagnostic is off by
default.
The diagnostic could perhaps be enabled by default for C, but due to the
design of jump diagnostic handling, it not a trivial task. For now,
we'll add the diagnostic as off-by-default so we get incremental
improvement, but a follow-up could try to refactor jump diagnostics so
we can enable this by default in C and have it as a C++ compatibility
diagnostic as well.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions