Re: Warning-suppression fixes we ought to back-patch

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-02-25T15:57:38Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> On 24.02.26 17:24, Tom Lane wrote:
>> While we've done a lot of const-cleanliness work recently, this patch
>> should be enough to silence most of the cast-away-const warnings I'm
>> seeing in the BF back branches.  Only "midge" is showing them at the
>> moment, but more people will be seeing them as gcc 16 gets more
>> widespread.

> These warnings came in from the new glibc version 2.43, not from the 
> compiler.

Ah.  Although I suppose you also need a sufficiently late-model
compiler, to understand the annotations on strchr() and friends.
Anyway, thanks for the correction.

			regards, tom lane



Commits

  1. Allow PG_PRINTF_ATTRIBUTE to be different in C and C++ code.

  2. Fix some cases of indirectly casting away const.