pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)
Date: Wed, 6 May 2020 19:39:03 -0400
Message-ID: <20200506233903.GA24861@alvherre.pgsql> (raw)
In-Reply-To: <15010.1586703320@sss.pgh.pa.us>

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





view thread (30+ messages)  latest in thread

Message-ID: <20200506233903.GA24861@alvherre.pgsql>
Permalink:  ../20200506233903.GA24861@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200506233903.GA24861@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, rjuju123@gmail.com
  Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)
  In-Reply-To: <20200506233903.GA24861@alvherre.pgsql>
  References: <15010.1586703320@sss.pgh.pa.us> <20200506233903.GA24861@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox