[Bug c/87038] diagnostics: Please add warning for jumping over initializers with switch/case in C mode
segher at gcc dot gnu.org
Sun Oct 21 22:06:00 GMT 2018
--- Comment #18 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Harald van Dijk from comment #15)
> (In reply to Segher Boessenkool from comment #10)
> > The initialisation (the call to f1) could have a side effect, but the
> > a==1 case skips that. GCC is right to warn here in my opinion.
> And warnings that are likely to trigger on
> perfectly valid code that behaves exactly as the author intended shouldn't
> be included in -Wall, per your own comment.
No, that is not what I said. *All* warnings are likely to trigger on valid
code, after all. I said "frequent false positives".
More information about the Gcc-bugs