On Tue, Sep 27, 2016 at 05:04:23PM +0200, Jakub Jelinek wrote: > On Tue, Sep 27, 2016 at 04:54:28PM +0200, Marek Polacek wrote: > > On Tue, Sep 27, 2016 at 10:48:50AM -0400, Jason Merrill wrote: > > > On Tue, Sep 27, 2016 at 9:56 AM, Michael Matz <m...@suse.de> wrote: > > > > On Tue, 27 Sep 2016, Jakub Jelinek wrote: > > > > > > > >> Just compare that to the number of real bugs the warning found in gcc > > > >> codebase. It is really worth it for -Wextra. > > > > > > > > All those bugs would also have been found as well when it had simply > > > > accepted > > > > /fall.*thr/i > > > > anywhere in the preceding comment on one line. But all the recent > > > > spelling changes of comments to cater for the strictness exactly shows > > > > how > > > > misguided that is. The above would accept "Don't fall through" as well. > > > > I say: so what? > > > > > > I agree. > > > > All right, I'm not opposed to making the comment parsing more benevolent. > > We still should have enough time to fine-tune it. > > Perhaps we want -Wimplicit-fallthrough{,=1,=2,=3,=4}, where > =1 would match indeed /fall.*thr/i (note, it will be really costly in this > case, one will have to parse all comments in detail in the preprocessor, > so I'd be against making it the default),
Perhaps we could use POSIX regcomp/regex functions; do you (or anyone else) have an idea how expensive they are and if it's feasible to use them in the preprocessor? Marek