[Bug c/61864] Feature Request, -Wcovered-switch-default to identify "dead" default branch
egall at gwmail dot gwu.edu
gcc-bugzilla@gcc.gnu.org
Mon Dec 22 02:26:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61864
Eric Gallager <egall at gwmail dot gwu.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egall at gwmail dot gwu.edu
--- Comment #2 from Eric Gallager <egall at gwmail dot gwu.edu> ---
this(In reply to Chengnian Sun from comment #0)
> Currently, GCC supports -Wswitch and -Wswitch-enum.
It also supports "-Wswitch-default", which seems to be the exact opposite of
clang's "-Wcovered-switch-default". Personally I think gcc's "-Wswitch-default"
is the better one to listen to; having a default case is a good back-up even if
it will never actually be reached. Here is a link to a post that explains it
better than I could: http://programmers.stackexchange.com/a/242896/161051
More information about the Gcc-bugs
mailing list