Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Mark Dilger <mark.dilger@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2020-04-22T02:46:05Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Do we intend to see this done in the current cycle?

I don't have an objection to doing it now.  It's just a new compiler
warning option, it shouldn't be able to break any code.  (Plus there's
plenty of time to revert, if somehow it causes a problem.)

			regards, tom lane



Commits

  1. Dial back -Wimplicit-fallthrough to level 3

  2. Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS

  3. Suppress -Wimplicit-fallthrough warning in new LIMIT WITH TIES code.

  4. Support FETCH FIRST WITH TIES