Re: enable fallthrough warnings on clang
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-04-07T14:35:27Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> On 06.04.26 23:31, Tom Lane wrote:
>> BF member ayu is failing said test:
>> ...
>> I don't know if it's worth catering to this extremely old
>> clang version ...
> But AFAICT, clang 5 and older are completely broken in this regard,
> because they react to the presence of [[clang::fallthrough]] with a
> syntax error ("error: expected expression"). Not even clang's own
> example code[0] works.
Hah, so we'd make it worse not better by adding
[[clang::fallthrough]]. Let's leave well enough alone then.
regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Enable -Wimplicit-fallthrough option for clang
- 0284e07599a5 19 (unreleased) landed
-
Fix additional fallthrough warning
- 3f7a0e1e55ef 19 (unreleased) landed
-
Fix additional fallthrough warnings from clang
- 3a63b76571ba 19 (unreleased) landed
-
test_cplusplusext: Add C++ pg_fallthrough test case
- 2f2c9d836373 19 (unreleased) landed
-
Use fallthrough attribute instead of comment
- 8354b9d6b602 19 (unreleased) landed
-
Remove useless fallthrough annotation
- 0c3fbb3fef1e 19 (unreleased) landed