mirror of
https://github.com/postgres/postgres.git
synced 2026-03-22 18:33:19 -04:00
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 |
||
|---|---|---|
| .. | ||
| expected | ||
| sql | ||
| .gitignore | ||
| btree_gin--1.0--1.1.sql | ||
| btree_gin--1.0.sql | ||
| btree_gin--1.1--1.2.sql | ||
| btree_gin--1.2--1.3.sql | ||
| btree_gin--1.3--1.4.sql | ||
| btree_gin.c | ||
| btree_gin.control | ||
| Makefile | ||
| meson.build | ||