[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gperf] switch fallthrough
From: |
Bruno Haible |
Subject: |
Re: [bug-gperf] switch fallthrough |
Date: |
Thu, 26 Jul 2018 02:05:17 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
Phil Willoughby wrote:
> We would like a way to change what gperf emits when it’s falling through
> from one case to another in a switch block. At the moment we see
> /*FALLTHOUGH*/ and I did not find a command-line flag or inline declaration
> that can alter that.
>
> The reason we’d like this is that we’re migrating to GCC 7 from 5 and
> we’re using the gcc flag -Werror=implicit-fallthrough.
Thanks for the suggestion. It's even possible to avoid the implicit-fallthrough
warnings without a command-line option or inline declaration.
Implemented through this patch:
http://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=0d37a8763d9a5169ee2cb71a0281f859ca159b87
Bruno