Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-31 Thread Marek Polacek
On Tue, Aug 30, 2016 at 01:08:22PM -0400, Jason Merrill wrote: > On Tue, Aug 30, 2016 at 10:25 AM, Marek Polacek wrote: > >> > @@ -10585,15 +10610,26 @@ cp_parser_statement (cp_parser* parser, tree > >> > in_statement_expr, > >> > } > >> >/* Look for an expression-statement instea

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-30 Thread Jason Merrill
On Tue, Aug 30, 2016 at 10:25 AM, Marek Polacek wrote: >> > @@ -10585,15 +10610,26 @@ cp_parser_statement (cp_parser* parser, tree >> > in_statement_expr, >> > } >> >/* Look for an expression-statement instead. */ >> >statement = cp_parser_expression_statement (parser, >

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-30 Thread Marek Polacek
On Tue, Aug 30, 2016 at 07:38:18AM -0400, Eric Gallager wrote: > On 8/30/16, Marek Polacek wrote: > > On Mon, Aug 29, 2016 at 09:32:04AM -0400, Eric Gallager wrote: > >> I tried v6 on my binutils-gdb fork, and it printed A LOT of > >> warnings... > > > > BTW, why is that so? Does binutils-gdb not

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-30 Thread Marek Polacek
On Mon, Aug 29, 2016 at 04:02:33PM -0400, Jason Merrill wrote: > On Mon, Aug 29, 2016 at 7:58 AM, Marek Polacek wrote: > > --- gcc/gcc/cp/parser.c > > +++ gcc/gcc/cp/parser.c > > @@ -5135,6 +5135,31 @@ cp_parser_primary_expression (cp_parser *parser, > > case RID_AT_SELECTOR: > >

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-30 Thread Eric Gallager
On 8/30/16, Marek Polacek wrote: > On Mon, Aug 29, 2016 at 09:32:04AM -0400, Eric Gallager wrote: >> I tried v6 on my binutils-gdb fork, and it printed A LOT of >> warnings... > > BTW, why is that so? Does binutils-gdb not use various FALLTHRU comments? > > Marek > There are a lot of comm

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-30 Thread Marek Polacek
On Mon, Aug 29, 2016 at 09:32:04AM -0400, Eric Gallager wrote: > I tried v6 on my binutils-gdb fork, and it printed A LOT of > warnings... BTW, why is that so? Does binutils-gdb not use various FALLTHRU comments? Marek

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread Jason Merrill
On Mon, Aug 29, 2016 at 7:58 AM, Marek Polacek wrote: > --- gcc/gcc/cp/parser.c > +++ gcc/gcc/cp/parser.c > @@ -5135,6 +5135,31 @@ cp_parser_primary_expression (cp_parser *parser, > case RID_AT_SELECTOR: > return cp_parser_objc_expression (parser); > > + case RID_ATTRIBUTE:

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread Marek Polacek
On Mon, Aug 29, 2016 at 10:41:57AM -0400, David Malcolm wrote: > Thanks. So presumably you have something like: > > ... case something: > 353 if (*(unsigned int *)c->var == UINT_MAX) > 354{ > 355 > 356/* various code here */ > 357} > 358 > 359 case var_zi

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread David Malcolm
On Mon, 2016-08-29 at 10:04 -0400, Eric Gallager wrote: > On 8/29/16, David Malcolm wrote: > > On Mon, 2016-08-29 at 09:32 -0400, Eric Gallager wrote: > > > On 8/29/16, Marek Polacek wrote: > > > > Tobias tried my latest version and reported some ICEs. They > > > > should > > > > all be > > > >

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread Eric Gallager
On 8/29/16, David Malcolm wrote: > On Mon, 2016-08-29 at 09:32 -0400, Eric Gallager wrote: >> On 8/29/16, Marek Polacek wrote: >> > Tobias tried my latest version and reported some ICEs. They should >> > all be >> > fixed in this version (the only change since version 6 is the >> > cp/pt.c >> >

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread David Malcolm
On Mon, 2016-08-29 at 09:32 -0400, Eric Gallager wrote: > On 8/29/16, Marek Polacek wrote: > > Tobias tried my latest version and reported some ICEs. They should > > all be > > fixed in this version (the only change since version 6 is the > > cp/pt.c > > hunk). > > > > At this point I'd like to

Re: Implement -Wimplicit-fallthrough (version 7)

2016-08-29 Thread Eric Gallager
On 8/29/16, Marek Polacek wrote: > Tobias tried my latest version and reported some ICEs. They should all be > fixed in this version (the only change since version 6 is the cp/pt.c > hunk). > > At this point I'd like to ask Jason and Joseph to review the C/C++ parts > and someone to review the ME