Re: gcc -Wimplicit-fallthrough and pg_unreachable

2020-11-28 Thread Tom Lane
Chapman Flack writes: > I noticed in CI builds of PL/Java with PG 13 that -Wimplicit-fallthrough=3 > in pg_config's CFLAGS was causing some switch case fallthrough warnings > after an elog(ERROR. [1] Yeah, I can replicate this here (gcc 8.3.1 on RHEL8). My recollection is that we saw this when t

gcc -Wimplicit-fallthrough and pg_unreachable

2020-11-28 Thread Chapman Flack
I noticed in CI builds of PL/Java with PG 13 that -Wimplicit-fallthrough=3 in pg_config's CFLAGS was causing some switch case fallthrough warnings after an elog(ERROR. [1] I added my own pg_unreachable() after the elog(ERROR, ...) calls [2] and that did away with the warnings. But it looks odd, a