Re: Something in our JIT code is screwing up PG_PRINTF_ATTRIBUTE
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>,
Pgsql Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-07T12:16:28Z
Lists: pgsql-hackers
On Sat, 6 Dec 2025 at 21:40, Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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've definitely run into this myself a bunch of times. I'm wondering if we should do this for more of these compiler features, e.g. HAVE_TYPEOF is strictly wrong for C++ builds afaict[1]. [1]: https://www.postgresql.org/message-id/flat/CAGECzQR21OnnKiZO_1rLWO0-16kg1JBxnVq-wymYW0-_1cUNtg@mail.gmail.com