[Bug c/7652] -Wswitch-break : Warn if a switch case falls through
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 19 07:56:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
--- Comment #47 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Tim Haines from comment #46)
> (In reply to Marek Polacek from comment #45)
> > Patches posted <https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00532.html>.
>
> Thank you for putting in the work to make this happen! Does the current
> patch allow calling a [[noreturn]] function without the need to follow it
> with a call to __builtin_fallthrough()? Something like
Yes. Note that I'm working on another version, so instead of
__builtin_fallthrough() you'd use [[fallthrough]]; or
__attribute__((fallthrough));. Noreturn functions are of course still being
taken into account.
More information about the Gcc-bugs
mailing list