This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/81582] -Wimplicit-fallthrough= wrong warning with -save-temps


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]