Re: pgsql: Clean up warnings from -Wimplicit-fallthrough.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Clean up warnings from -Wimplicit-fallthrough.
Date: 2018-05-02 03:33:25
Message-ID: 7773.1525232005@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2018-05-01 23:35:18 +0000, Tom Lane wrote:
>> Clean up warnings from -Wimplicit-fallthrough.

> I found one more oddity with the current committed state: ...
> It seems that gcc gets confused by the #ifdef ECONNRESET.

Yeah, there's a gcc bug or three about that:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817

> ... But the nicer fix seems to be to move the
> FALL THRU into the ifdef, which even seems more correct when nitpicking
> in god mode.

I thought about that, and didn't like it much. I hoped maybe the gcc guys
would fix it soon, but after reading their bugzilla entry more closely,
it sounds like we shouldn't hold our breath. So if you want to do it
like that, OK by me.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-05-02 04:25:44 pgsql: Change SIZEOF_BOOL to 1 for Windows.
Previous Message Andres Freund 2018-05-02 02:55:58 Re: pgsql: Clean up warnings from -Wimplicit-fallthrough.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-02 03:53:05 Re: A few warnings on Windows
Previous Message Andres Freund 2018-05-02 03:05:50 Re: A few warnings on Windows