postgresql/contrib/btree_gin
Peter Eisentraut 8354b9d6b6 Use fallthrough attribute instead of comment
Instead of using comments to mark fallthrough switch cases, use the
fallthrough attribute.  This will (in the future, not here) allow
supporting other compilers besides gcc.  The commenting convention is
only supported by gcc, the attribute is supported by clang, and in the
fullness of time the C23 standard attribute would allow supporting
other compilers as well.

Right now, we package the attribute into a macro called
pg_fallthrough.  This commit defines that macro and replaces the
existing comments with that macro invocation.

We also raise the level of the gcc -Wimplicit-fallthrough= option from
3 to 5 to enforce the use of the attribute.

Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://www.postgresql.org/message-id/flat/76a8efcd-925a-4eaf-bdd1-d972cd1a32ff%40eisentraut.org
2026-02-19 08:51:12 +01:00
..
expected Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
sql Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
btree_gin--1.0--1.1.sql Add support for EUI-64 MAC addresses as macaddr8 2017-03-15 11:16:25 -04:00
btree_gin--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
btree_gin--1.1--1.2.sql Add btree_gin support for enum types 2017-03-21 11:04:17 -04:00
btree_gin--1.2--1.3.sql Add support of bool, bpchar, name and uuid to btree_gin 2018-04-05 18:19:10 +03:00
btree_gin--1.3--1.4.sql Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
btree_gin.c Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
btree_gin.control Add cross-type comparisons to contrib/btree_gin. 2025-07-03 16:24:31 -04:00
Makefile Add cross-type comparisons to contrib/btree_gin. 2025-07-03 16:24:31 -04:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00