Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-08 Thread Marek Polacek
On Fri, Sep 30, 2016 at 10:05:57PM +0200, Jakub Jelinek wrote: > On Fri, Sep 30, 2016 at 11:26:27AM +0200, Marek Polacek wrote: > > I haven't gone over the patch in detail yet, but I wonder if we should > > also accept /* Else, fall through. */ (to be found e.g. in > > aarch64-simd.md). > >

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-04 Thread Eric Botcazou
> I think the vast majority of the comments I changed (removing "...") > wouldn't have to be changed were this patch in. So can we install it instead of arguing about hypothetical things? -- Eric Botcazou

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-04 Thread Marek Polacek
On Tue, Oct 04, 2016 at 05:58:17PM +0200, Michael Matz wrote: > Hi, > > On Sat, 1 Oct 2016, Jakub Jelinek wrote: > > > > - /* ... fall through for unsigned ints ... */ > > > + /* fall through */ > > > > > > -/* For other instructions, fallthru. */ > > > +

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-04 Thread Michael Matz
Hi, On Sat, 1 Oct 2016, Jakub Jelinek wrote: > > - /* ... fall through for unsigned ints ... */ > > + /* fall through */ > > > > -/* For other instructions, fallthru. */ > > +/* fallthru. */ > > > > - /* fall thru to manual case */ > > +

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-03 Thread Tom Tromey
> "Eric" == Eric Botcazou writes: Eric> So, because of its excessive pickiness, the warning ends up making the user Eric> butcher informative comments. How is that helpful? Those comments are not informative. In most cases I kept the original text just to

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-01 Thread Jakub Jelinek
On Sat, Oct 01, 2016 at 10:49:03AM +0200, Eric Botcazou wrote: > > See Tom Tromey's explanation why accepting too much is bad (at least unless > > we want multiple levels). > > Tom's changes made to GDB are IMO the perfect examples of what we don't want: > > - /* ... fall through for

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-10-01 Thread Eric Botcazou
> See Tom Tromey's explanation why accepting too much is bad (at least unless > we want multiple levels). Tom's changes made to GDB are IMO the perfect examples of what we don't want: - /* ... fall through for unsigned ints ... */ + /* fall through */ -/* For other

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jason Merrill
On Fri, Sep 30, 2016 at 7:10 AM, Bernd Schmidt wrote: > On 09/30/2016 12:51 PM, Jakub Jelinek wrote: >> On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: >>> On 09/30/2016 11:45 AM, Jakub Jelinek wrote: >>> See Tom Tromey's explanation why accepting too much

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jakub Jelinek
On Fri, Sep 30, 2016 at 11:26:27AM +0200, Marek Polacek wrote: > I haven't gone over the patch in detail yet, but I wonder if we should > also accept /* Else, fall through. */ (to be found e.g. in aarch64-simd.md). Here is the patch split into a series of 3 patches (the later patches depend on

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jakub Jelinek
On Fri, Sep 30, 2016 at 10:10:55AM -0600, Martin Sebor wrote: > I haven't been following the discussion very closely so I may have > missed that what I'm about to suggest has been discussed and rejected > for some valid reason, but if not let me try. > > It seems to me that the ultimate, long

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Martin Sebor
I haven't been following the discussion very closely so I may have missed that what I'm about to suggest has been discussed and rejected for some valid reason, but if not let me try. It seems to me that the ultimate, long term goal should be to have actively maintained code bases gradually

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Marek Polacek
On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: > On 09/30/2016 11:45 AM, Jakub Jelinek wrote: > > > See Tom Tromey's explanation why accepting too much is bad (at least unless > > we want multiple levels). > > And I still don't buy it. The case where someone writes "Don't fall

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Bernd Schmidt
On 09/30/2016 12:51 PM, Jakub Jelinek wrote: On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: On 09/30/2016 11:45 AM, Jakub Jelinek wrote: See Tom Tromey's explanation why accepting too much is bad (at least unless we want multiple levels). And I still don't buy it. The case

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jakub Jelinek
On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: > On 09/30/2016 11:45 AM, Jakub Jelinek wrote: > > >See Tom Tromey's explanation why accepting too much is bad (at least unless > >we want multiple levels). > > And I still don't buy it. The case where someone writes "Don't fall

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Bernd Schmidt
On 09/30/2016 11:45 AM, Jakub Jelinek wrote: See Tom Tromey's explanation why accepting too much is bad (at least unless we want multiple levels). And I still don't buy it. The case where someone writes "Don't fall through" is artificial to begin with, and also forgetting to put the break;

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Marek Polacek
On Fri, Sep 30, 2016 at 11:31:43AM +0200, Jakub Jelinek wrote: > On Fri, Sep 30, 2016 at 11:26:27AM +0200, Marek Polacek wrote: > > On Thu, Sep 29, 2016 at 10:16:33PM +0200, Jakub Jelinek wrote: > > > The following patch does a few things: > > > 1) fixes -Wimplicit-fallthrough -C > > >(with -C

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jakub Jelinek
On Fri, Sep 30, 2016 at 11:42:12AM +0200, Eric Botcazou wrote: > > Clearly people are extremely creative with these comments, maybe it would be > > better to just remove the new additions from the patch I've posted (drop > > the else/intentational/intentationally/... around/!!! around etc., to

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Eric Botcazou
> Clearly people are extremely creative with these comments, maybe it would be > better to just remove the new additions from the patch I've posted (drop > the else/intentational/intentationally/... around/!!! around etc., to force > people to standardize on something), and just apply the fixes

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Jakub Jelinek
On Fri, Sep 30, 2016 at 11:26:27AM +0200, Marek Polacek wrote: > On Thu, Sep 29, 2016 at 10:16:33PM +0200, Jakub Jelinek wrote: > > The following patch does a few things: > > 1) fixes -Wimplicit-fallthrough -C > >(with -C the PREV_FALLTHROUGH flag is on the CPP_COMMENT token, we need > >

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Marek Polacek
On Thu, Sep 29, 2016 at 10:16:33PM +0200, Jakub Jelinek wrote: > Hi! > > The following patch does a few things: > 1) fixes -Wimplicit-fallthrough -C >(with -C the PREV_FALLTHROUGH flag is on the CPP_COMMENT token, we need > to propagate it to the C/C++ token's flags in the FEs) > 2) it

[PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-29 Thread Jakub Jelinek
Hi! The following patch does a few things: 1) fixes -Wimplicit-fallthrough -C (with -C the PREV_FALLTHROUGH flag is on the CPP_COMMENT token, we need to propagate it to the C/C++ token's flags in the FEs) 2) it accepts a comment in between /* FALLTHRU */ comment and the case/default