Re: Something in our JIT code is screwing up PG_PRINTF_ATTRIBUTE
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Pgsql Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-06T20:40:25Z
Lists: pgsql-hackers
Attachments
- v1-separate-c-and-cxx-printf-archetypes.patch (text/x-diff) patch v1
Daniel Gustafsson <daniel@yesql.se> writes: > On 4 Dec 2025, at 19:01, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> On the other hand, aligning the C++ compiler with the C compiler >> is likely to avoid other problems, so maybe it's better to focus >> on making that happen. I'm not sure how we'd do that automatically >> though. > It sounds pretty complicated to, with confidence, automatically detect this. Yeah. However, selecting different PG_PRINTF_ATTRIBUTE values for C and C++ mode seems to get the job done. I've confirmed the attached silences these warnings for me when mixing-and-matching gcc and clang. I don't have a lot of faith in the meson.build addition being correct, though it worked in a simple test. Anyone want to review that? 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 →
-
Allow PG_PRINTF_ATTRIBUTE to be different in C and C++ code.
- ff9bd96754f1 14.23 landed
- ae40bb835135 17.10 landed
- 7e788a585a6c 15.18 landed
- 753d5eee46d1 18.4 landed
- 1d97e47883e0 16.14 landed
- 0909380e4c9a 19 (unreleased) landed