Re: Implement -Wimplicit-fallthrough (version 8)

2016-09-20 Thread Jakub Jelinek
On Tue, Sep 20, 2016 at 04:24:35PM +0200, Marek Polacek wrote: > > (to skip over the koenig_p etc. cases) and fallthrough into the argument > > handling and add another if (function == NULL_TREE) handling after that, > > which would just build another internal call with the tsubsted arguments. >

Re: Implement -Wimplicit-fallthrough (version 8)

2016-09-20 Thread Marek Polacek
On Fri, Sep 09, 2016 at 06:44:44PM +0200, Jakub Jelinek wrote: > Hi! Finally getting back to this... > On Thu, Sep 01, 2016 at 03:40:49PM +0200, Marek Polacek wrote: > > @@ -1749,6 +1758,16 @@ c_parser_declaration_or_fndef (c_parser *parser, > > bool fndef_ok, > > { > >if (auto_typ

Re: Implement -Wimplicit-fallthrough (version 8)

2016-09-09 Thread Jakub Jelinek
Hi! On Thu, Sep 01, 2016 at 03:40:49PM +0200, Marek Polacek wrote: > @@ -1749,6 +1758,16 @@ c_parser_declaration_or_fndef (c_parser *parser, bool > fndef_ok, > { >if (auto_type_p) > error_at (here, "%<__auto_type%> in empty declaration"); > + else if (specs->typespec_kind

Re: Implement -Wimplicit-fallthrough (version 8)

2016-09-01 Thread Joseph Myers
On Thu, 1 Sep 2016, Marek Polacek wrote: > Yet another version. Changes from version 7: > > * no more fix-it hints untils we resolve some of the issues this patch > has discovered; instead, I simply used an inform call, > * I've fixed a bogus -Wdeclaration-after-statement warning in the C FE,

Re: Implement -Wimplicit-fallthrough (version 8): add gcc_fallthrough()

2016-09-01 Thread Jakub Jelinek
On Thu, Sep 01, 2016 at 04:51:37PM +0200, Marek Polacek wrote: > I thought I'd keep it since it conveys something more than a pure "falls > through" comments, but I changed it anyway. Here's the pure comment > changes patch which I hope can be committed right away. > > 2016-09-01 Marek Polacek

Re: Implement -Wimplicit-fallthrough (version 8): add gcc_fallthrough()

2016-09-01 Thread Marek Polacek
On Thu, Sep 01, 2016 at 04:27:01PM +0200, Jakub Jelinek wrote: > On Thu, Sep 01, 2016 at 03:42:12PM +0200, Marek Polacek wrote: > > --- gcc/gcc/c-family/c-common.c > > +++ gcc/gcc/c-family/c-common.c > > @@ -11590,6 +11590,7 @@ resolve_overloaded_builtin (location_t loc, tree > > function, > >

Re: Implement -Wimplicit-fallthrough (version 8): add gcc_fallthrough()

2016-09-01 Thread Jakub Jelinek
On Thu, Sep 01, 2016 at 03:42:12PM +0200, Marek Polacek wrote: > --- gcc/gcc/c-family/c-common.c > +++ gcc/gcc/c-family/c-common.c > @@ -11590,6 +11590,7 @@ resolve_overloaded_builtin (location_t loc, tree > function, > gcc_unreachable (); > } > /* Fallthrough to the normal p

Implement -Wimplicit-fallthrough (version 8): add gcc_fallthrough()

2016-09-01 Thread Marek Polacek
Tobias pointed out that I need to add a new gcc_fallthrough into trans-io.c, so done. Bootstrapped/regtested on x86_64-linux and ppc64-linux. 2016-08-31 Marek Polacek PR c/7652 * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn, insn-latencytab.o-warn, insn-output.

Implement -Wimplicit-fallthrough (version 8)

2016-09-01 Thread Marek Polacek
Yet another version. Changes from version 7: * no more fix-it hints untils we resolve some of the issues this patch has discovered; instead, I simply used an inform call, * I've fixed a bogus -Wdeclaration-after-statement warning in the C FE, new test added, * I've addressed Jason's comments