Re: Add "-Wimplicit-fallthrough" to default flags
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andy Fan <zhihui.fan1213@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Julien Rouhaud <rjuju123@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-05-13T14:02:34Z
Lists: pgsql-hackers
Andy Fan <zhihui.fan1213@gmail.com> writes: >> FWIW, I got a warning for jsonpath_gram.c. Ugh. Confirmed here on Fedora 30 (bison 3.0.5). > I just found this just serval minutes ago. Upgrading your bison to the > latest version (3.6) is ok. I'd like we have a better way to share this > knowledge through. I spend ~30 minutes to troubleshooting this issue. I fear that is going to mean that we revert this patch. We are *NOT* moving the minimum bison requirement for this, especially not to a bleeding-edge bison version. Alternatively, it might work to go back down to warning level 3; I see that the code in question has /* Fall through. */ which I believe would work at the lower warning level. But that raises the question of how far back bison generates code that is clean --- and, again, I'm not willing to move the minimum bison requirement. (On the other hand, if you have an old bison, you likely also have an old gcc that doesn't know this warning switch, so maybe it'd be all right in practice?) regards, tom lane
Commits
-
Dial back -Wimplicit-fallthrough to level 3
- 17cc133f017c 13.0 landed
-
Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS
- 3e9744465dbe 13.0 landed
-
Suppress -Wimplicit-fallthrough warning in new LIMIT WITH TIES code.
- 35cb574aa847 13.0 landed
-
Support FETCH FIRST WITH TIES
- 357889eb17bb 13.0 cited