pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)
Date: Tue, 12 May 2020 16:14:51 -0400
Message-ID: <20200512201451.GA6186@alvherre.pgsql> (raw)
In-Reply-To: <CAOBaU_auOcrUp2G5BkPStk823doZHA4B=7qAu+e7BeK2f7j7ng@mail.gmail.com>

On 2020-May-11, Julien Rouhaud wrote:

> On Mon, May 11, 2020 at 4:40 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > Julien Rouhaud <rjuju123@gmail.com> writes:
> > > On Mon, May 11, 2020 at 3:41 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >> Why?  It uses "fallthrough" which is a legal spelling per level 4.
> >
> > > GCC documentation mentions [ \t]*FALLTHR(OUGH|U)[ \t]* for level 4
> > > (out of the view other alternatives), which AFAICT is case sensitive
> > > (level 3 has fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?).
> >
> > Oh, I'd missed that that was case sensitive.  Ugh --- that seems
> > unreasonable.  Maybe we'd better settle for level 3 after all;
> > I don't think there's much room to doubt the intentions of a
> > comment spelled that way.
> 
> Agreed.

Pushed, thanks.

I ended up using level 4 and dialling back to 3 for zic.c only
(different make trickery though).  I also settled on FALLTHROUGH rather
than FALLTHRU because the latter seems ugly as a spelling to me.  I'm
not a fan of the uppercase, but the alternative would be to add a - or
@s.

I get no warnings with this (gcc 8), but ccache seems to save warnings
in one run so that they can be thrown in a later one.  I'm not sure what
to make of that, but ccache -d proved that beyond reasonable doubt and
ccache -clear got rid of the lot.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (30+ messages)  latest in thread

Message-ID: <20200512201451.GA6186@alvherre.pgsql>
Permalink:  ../20200512201451.GA6186@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200512201451.GA6186@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, rjuju123@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)
  In-Reply-To: <20200512201451.GA6186@alvherre.pgsql>
  References: <CAOBaU_auOcrUp2G5BkPStk823doZHA4B=7qAu+e7BeK2f7j7ng@mail.gmail.com> <20200512201451.GA6186@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