Enable -Wimplicit-fallthrough option for clang
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-02-23T06:40:19Z
Releases:
19 (unreleased)
Enable -Wimplicit-fallthrough option for clang On clang, -Wimplicit-fallthrough requires annotations with attributes, but on gcc, -Wimplicit-fallthrough is the same as -Wimplicit-fallthrough=3, which allows annotations with comments. In order to enforce consistent annotations with attributes on both compilers, we test first for -Wimplicit-fallthrough=5, which will succeed on gcc, and if that is not found we test for -Wimplicit-fallthrough. Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl> Discussion: https://www.postgresql.org/message-id/flat/76a8efcd-925a-4eaf-bdd1-d972cd1a32ff%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +103 −0 |
| configure.ac | modified | +14 −0 |
| meson.build | modified | +18 −1 |
Discussion
- enable fallthrough warnings on clang 7 messages · 2026-01-20 → 2026-04-07