From: Bernd Schmidt <bschmidt@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>, Marek Polacek <polacek@redhat.com>
Cc: NightStrike <nightstrike@gmail.com>,
"Joseph S. Myers" <joseph@codesourcery.com>,
Jason Merrill <jason@redhat.com>,
Andi Kleen <andi@firstfloor.org>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Implement -Wswitch-fallthrough
Date: Tue, 12 Jul 2016 14:22:00 -0000 [thread overview]
Message-ID: <49486347-dbf6-63fe-869a-a105c831900c@redhat.com> (raw)
In-Reply-To: <20160712141412.GB7387@tucnak.redhat.com>
On 07/12/2016 04:14 PM, Jakub Jelinek wrote:
> On Tue, Jul 12, 2016 at 04:08:02PM +0200, Marek Polacek wrote:
>> On Tue, Jul 12, 2016 at 09:57:01AM -0400, NightStrike wrote:
>>> From http://security.coverity.com/blog/2013/Sep/gimme-a-break.html:
>>
>> Thanks, this is useful.
>>
>>> We also suppress a case label if there is a comment that matches
>>> [^#]fall.?thro?u, even if it's not on the last line.
>>
>> Our current plan is to handle sth like
>> [ \t]*FALL(S | |-)?THR(OUGH|U)\.?[ \t]*
>> [ \t]*Fall(s | |-)?[Tt]hr(ough|u)\.?[ \t]*
>> [ \t]*fall(s | |-)?thr(ough|u)\.?[ \t]*
>
> And
> /*-fallthrough*/
> /*@fallthrough@*/
> //-fallthrough
> //@fallthrough@
> (those 4 as standardized lint comments only in lowercase, the
> above regexps are meant to match the whole comment content, i.e.
> everything between /* and */ or // and \n.
I think this approach is doomed to fail, because it takes only one
language into account, and fails with preprocessed sources.
Bernd
next prev parent reply other threads:[~2016-07-12 14:22 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 19:43 Marek Polacek
2016-07-11 19:46 ` Implement -Wswitch-fallthrough: core Marek Polacek
2016-07-11 19:50 ` Implement -Wswitch-fallthrough: c-family/ Marek Polacek
2016-07-11 19:50 ` Implement -Wswitch-fallthrough: c/ Marek Polacek
2016-07-11 19:51 ` Implement -Wswitch-fallthrough: cp/ Marek Polacek
2016-07-11 19:52 ` Implement -Wswitch-fallthrough: gcc/ Marek Polacek
2016-07-11 19:52 ` Implement -Wswitch-fallthrough: fortran/ Marek Polacek
2016-07-11 19:53 ` Implement -Wswitch-fallthrough: aarch64 + arm Marek Polacek
2016-07-14 9:05 ` Richard Earnshaw (lists)
2016-07-11 19:54 ` Implement -Wswitch-fallthrough: java Marek Polacek
2016-07-11 21:26 ` Tom Tromey
2016-07-11 19:54 ` Implement -Wswitch-fallthrough: i386 Marek Polacek
2016-07-11 19:54 ` Implement -Wswitch-fallthrough: go Marek Polacek
2016-07-11 19:55 ` Implement -Wswitch-fallthrough: libatomic Marek Polacek
2016-07-11 19:55 ` Implement -Wswitch-fallthrough: libcpp Marek Polacek
2016-07-11 19:56 ` Implement -Wswitch-fallthrough: libgomp Marek Polacek
2016-07-11 19:56 ` Implement -Wswitch-fallthrough: libgcc Marek Polacek
2016-07-11 19:57 ` Implement -Wswitch-fallthrough: libiberty Marek Polacek
2016-07-11 19:57 ` Implement -Wswitch-fallthrough: libgo Marek Polacek
2016-07-11 19:58 ` Implement -Wswitch-fallthrough: libstdc++ Marek Polacek
2016-07-11 22:18 ` Jonathan Wakely
2016-07-11 19:58 ` Implement -Wswitch-fallthrough: objc Marek Polacek
2016-07-11 19:58 ` Implement -Wswitch-fallthrough: lto Marek Polacek
2016-07-12 10:23 ` Richard Biener
2016-07-12 10:28 ` Marek Polacek
2016-07-11 19:59 ` Implement -Wswitch-fallthrough: other archs Marek Polacek
2016-07-11 19:59 ` Implement -Wswitch-fallthrough: rs6000 Marek Polacek
2016-07-11 20:36 ` Bruce Korb
2016-07-13 18:23 ` Marek Polacek
2016-07-13 18:31 ` Bruce Korb
2016-07-13 18:40 ` Marek Polacek
2016-07-13 18:48 ` Bruce Korb
2016-07-13 22:36 ` Bruce Korb
2016-07-13 22:53 ` Marek Polacek
2016-07-12 14:11 ` Segher Boessenkool
2016-07-12 14:20 ` Marek Polacek
2016-07-12 14:42 ` Bernd Schmidt
2016-07-12 14:45 ` Jakub Jelinek
2016-07-11 20:00 ` Implement -Wswitch-fallthrough: testsuite Marek Polacek
2016-07-11 20:00 ` Implement -Wswitch-fallthrough Andrew Pinski
2016-07-11 20:01 ` Marek Polacek
2016-07-11 20:03 ` Andrew Pinski
2016-07-11 20:01 ` Andi Kleen
2016-07-11 20:04 ` Marek Polacek
2016-07-11 20:18 ` Andi Kleen
2016-07-11 20:23 ` Marek Polacek
2016-07-11 20:35 ` Jakub Jelinek
2016-07-11 20:44 ` David Malcolm
2016-07-11 20:50 ` Jakub Jelinek
2016-07-12 13:57 ` NightStrike
2016-07-12 14:08 ` Marek Polacek
2016-07-12 14:14 ` Jakub Jelinek
2016-07-12 14:22 ` Bernd Schmidt [this message]
2016-07-12 14:36 ` Jakub Jelinek
2016-07-11 20:08 ` Eric Botcazou
2016-07-11 20:12 ` Jakub Jelinek
2016-07-11 20:20 ` Marek Polacek
2016-07-11 20:30 ` Eric Botcazou
2016-07-11 20:39 ` David Malcolm
2016-07-11 20:28 ` NightStrike
2016-07-13 18:16 ` Marek Polacek
2016-07-13 18:39 ` Marc Glisse
2016-07-13 18:47 ` Marek Polacek
2016-07-13 19:05 ` Marc Glisse
2016-08-12 14:42 ` Marek Polacek
2016-07-12 10:27 ` Richard Biener
2016-07-12 10:31 ` Marek Polacek
2016-07-12 15:59 ` Jeff Law
2016-07-12 16:04 ` Marek Polacek
2016-07-12 17:40 ` Martin Sebor
2016-07-12 17:52 ` Marek Polacek
2016-07-12 11:24 ` Bernd Schmidt
2016-07-12 11:36 ` Marek Polacek
2016-07-12 16:10 ` Jeff Law
2016-07-28 17:04 ` Marek Polacek
2016-07-12 21:00 ` Martin Sebor
2016-07-28 17:03 ` Marek Polacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49486347-dbf6-63fe-869a-a105c831900c@redhat.com \
--to=bschmidt@redhat.com \
--cc=andi@firstfloor.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=nightstrike@gmail.com \
--cc=polacek@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).