From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES) |
Date: | 2020-05-06 23:39:03 |
Message-ID: | 20200506233903.GA24861@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 2020-Apr-12, Tom Lane wrote:
> The only more-restrictive alternative, short of disabling
> the comments altogether, is
>
> * -Wimplicit-fallthrough=4 case sensitively matches one of the
> following regular expressions:
>
> *<"-fallthrough">
> *<"@fallthrough@">
> *<"lint -fallthrough[ \t]*">
> *<"[ \t]*FALLTHR(OUGH|U)[ \t]*">
>
> Thoughts?
This doesn't allow whitespace between "fall" and "through", which means
we generate 217 such warnings currently. Or we can just use
-Wimplicit-fallthrough=3, which does allow whitespace (among other
detritus).
For my own reference, the manual is at
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-05-07 13:00:36 | pgsql: doc: PG 13 relnotes: adjust partition items and attributions |
Previous Message | Bruce Momjian | 2020-05-06 23:34:32 | pgsql: doc: PG 13 relnotes, update TOAST item to mention decompression |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-05-06 23:40:25 | Re: PG 13 release notes, first draft |
Previous Message | Bruce Momjian | 2020-05-06 23:35:34 | Re: PG 13 release notes, first draft |