This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix a few fall through cases
- From: Martin Jambor <mjambor at suse dot cz>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Aug 2016 17:51:18 +0200
- Subject: Re: [PATCH] Fix a few fall through cases
- Authentication-results: sourceware.org; auth=none
- References: <20160809152126.GQ7007@redhat.com>
Hi,
On Tue, Aug 09, 2016 at 05:21:26PM +0200, Marek Polacek wrote:
> Testing with -Wimplicit-fallthrough turned up a few spots where
> fall through is either a bug, or just too confusing. This patch
> should be desirable even though the warning is still not in.
>
> Eric, can you look at the c-ada-spec.c part?
> Martin, does the hsa-gen.c part look correct?
>
> --- gcc/gcc/hsa-gen.c
> +++ gcc/gcc/hsa-gen.c
> @@ -5039,6 +5039,7 @@ gen_hsa_insn_for_internal_fn_call (gcall *stmt, hsa_bb *hbb)
> case IFN_FMIN:
> case IFN_FMAX:
> gen_hsa_insns_for_call_of_internal_fn (stmt, hbb);
> + break;
>
> default:
> HSA_SORRY_ATV (gimple_location (stmt),
Yes it is correct. Thanks for catching this.
-Wimplicit-fallthrough is really useful work!
Martin