This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/81582] -Wimplicit-fallthrough= wrong warning with -save-temps
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jul 2017 14:17:15 +0000
- Subject: [Bug other/81582] -Wimplicit-fallthrough= wrong warning with -save-temps
- Auto-submitted: auto-generated
- References: <bug-81582-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81582
--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> If you are preprocessing without -C and without -fdirectives-only, then
> comments are gone, so you really can't use them to inhibit the warning.
Yes, so -Wimplicit-fallthrough is really fragile. And the information is
obviously available somewhere[tm] as the diagnostic displays it, adding even
more confusion.
This might all be acceptable if -Wimplicit-fallthrough had to be enabled by
hand, but it is enabled per default with -W (and yes, I know that's
documented). It's still questionable to have such stuff enabled per default
given its fragility.
I am understanding all this from a GCC internal development perspective, but
not when I am taking the perspective of an ordinary user.