On 2025-09-17 17:00:42 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2025-09-17 16:38:56 -0400, Tom Lane wrote:
> >> 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...
>
> Well, we should either commit to it (and put -Wextra into our
> standard switches) or not.
I'd be mildly worried about -Wextra in older compilers (and clang, but just
because I don't regularly track -Wextra with clang). But I'd be up for trying
it out.
A slightly more targeted approach would be to add -Wstringop-truncation to our
explicitly enabled warnings...
Greetings,
Andres Freund