This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/7652] -Wswitch-break : Warn if a switch case falls through
- From: "thaines.astro at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2016 00:30:43 +0000
- Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through
- Auto-submitted: auto-generated
- References: <bug-7652-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
Tim Haines <thaines.astro at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thaines.astro at gmail dot com
--- Comment #46 from Tim Haines <thaines.astro at gmail dot com> ---
(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
int i = ...;
switch (i) {
case 1:
std::abort();
// don't warn about fallthrough here
case 2:
std::cout << "Hello world!\n";
break;
}