This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Implement -Wswitch-fallthrough
- From: Marek Polacek <polacek at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Jul 2016 22:04:51 +0200
- Subject: Re: Implement -Wswitch-fallthrough
- Authentication-results: sourceware.org; auth=none
- References: <20160711194340.GI13963@redhat.com> <87mvlot05a.fsf@tassilo.jf.intel.com>
On Mon, Jul 11, 2016 at 01:01:05PM -0700, Andi Kleen wrote:
> Marek Polacek <polacek@redhat.com> writes:
> >
> > This warning is enabled by default for C/C++.
>
> That's purely evil. So have to put your non standard builtin all over
> standards compliant code just to shut off a warning that is likely
> common. And you're not even supporting the classic lint style comment either.
I explained why supporting the classic lint style comment wouldn't fly.
> I think it's ok to make this a separate option, but even putting it in
> -Wall would annoy far too many people (including me) for good reasons.
> Making it default is just totally wrong.
Ok. As I mentioned elsewhere, moving this to -Wextra (or even out of -Wall/-Wextra)
is a one liner change.
Marek