[Bug c/87038] diagnostics: Please add warning for jumping over initializers with switch/case in C mode
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Oct 21 18:26:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87038
--- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I am saying that no warning should warn for things that are valid C but
invalid C++, except with -Wc++-compat; not for that reason, anyway.
-Wjump-misses-init should warn here: the jump does miss the init! And it
can be quite harmful in cases, and is trivial to work around.
But warning for constructs that are not valid in C++, when compiling C code
(and not asking for such a warning specifically) is a disservice to the user.
More information about the Gcc-bugs
mailing list