From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: New string-truncation warnings from GCC 15 |
Date: | 2025-09-17 20:54:16 |
Message-ID: | qjju4mxez6x2wiquw7kl2nr5abpy22d6xirv74ksm6v7hgnqtw@hb5c6idizp4z |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2025-09-17 16:38:56 -0400, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> > On 17.09.25 00:48, Tom Lane wrote:
> >> Several of the buildfarm animals seem to have been updated to
> >> GCC 15 over the past week or so. They are now moaning about
> >> various places where we're intentionally omitting a string
> >> terminator, eg these warnings from scorpion:
> >>
> >> scorpion | 2025-09-16 18:39:03 | ../pgsql/src/backend/commands/copyfromparse.c:139:41: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (12 chars into 11 available) [-Wunterminated-string-initialization]
>
> > Note that this is not a default warning option in gcc or an option put
> > in by PostgreSQL. This comes from -Wextra, which that buildfarm member
> > has added by itself. So there is also an option C in having that
> > buildfarm member turn off that option.
>
> Oh! Hmm... I am not sure that we want to commit to being -Wextra
> clean across-the-board.
We've been -Wextra clean for years, with a few temporary exceptions. IME a lot
of warnings added to -Wextra in one year, get promoted to -Wall a few releases
later. I found plenty mistakes with -Wextra stuff, so I'd be sad if we decided
we're not trying to fix them...
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-09-17 21:00:42 | Re: New string-truncation warnings from GCC 15 |
Previous Message | Bruce Momjian | 2025-09-17 20:45:14 | Re: PG 18 release notes draft committed |