Re: New string-truncation warnings from GCC 15 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New string-truncation warnings from GCC 15
Date
Msg-id 1413298.1758067699@sss.pgh.pa.us
Whole thread Raw
In response to Re: New string-truncation warnings from GCC 15  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2025-09-16 18:48:07 -0400, Tom Lane wrote:
>> It's not clear to me how well this approach will play with
>> non-GCC compilers.

> I'd assume we'd do something like

> #if has_attribute(nonstring)
> #define pg_nonstring __attribute__((nonstring))
> #else
> ...
> #define pg_nonstring
> #endif

> I can't really imagine that causing issues for other compilers...

Well, it wouldn't cause build failures, but perhaps it might fail
to silence comparable warnings from other compilers?  This is
hypothetical of course, I don't know of any such case today.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: REPACK and naming
Next
From: David Rowley
Date:
Subject: Re: Fix missing EvalPlanQual recheck for TID scans