Re: Add "-Wimplicit-fallthrough" to default flags

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andy Fan <zhihui.fan1213@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-05-13T15:34:21Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> I fear that is going to mean that we revert this patch.

> Or we can filter-out the -Wimplicit-fallthrough, or change to level 3,
> for bison-emitted files.

Let's just go to level 3 overall (and revert the changes you made for
level 4 compliance --- they're more likely to cause back-patching
pain than do anything useful).

			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