Re: Clang function pointer type warnings in v14, v15

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clang function pointer type warnings in v14, v15
Date: 2024-07-12 04:29:00
Message-ID: CA+hUKGLsD9Zc4aCvxp+L-MKPLvPtr=_R60cXAJt1bbxr0nJruQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 12, 2024 at 2:26 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > On Sat, Jul 6, 2024 at 2:35 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> I see that there are a boatload of related warnings in older
> >> branches too; do we want to try to do anything about that? (I doubt
> >> code changes would be in-scope, but maybe adding a -Wno-foo switch
> >> to the build flags would be appropriate.)
>
> > I don't see any on clang 16 in the 12 and 13 branches. Where are you
> > seeing them?
>
> In the buildfarm. "adder" and a bunch of other machines are throwing
> -Wcast-function-type in about two dozen places in v13, and "jay" is
> emitting several hundred -Wdeprecated-non-prototype warnings.

Ah, I see. A few animals running with -Wextra. Whereas in v14+ we
have -Wcast-function-type in the actual tree, which affects people's
workflows more directly. Like my regular machine, or CI, when a
couple of the OSes' house compilers eventually reach clang 16.

I gess we have to decide if it's a matter for the tree, or for the
people who add -Wextra, ie to decide if they want to filter that down
a bit with some -Wno-XXX. Adder already has some of those:

'CFLAGS' => '-O1 -ggdb -g3
-fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter
-Wno-sign-compare -Wno-missing-field-initializers -O0',

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-07-12 04:34:13 Re: Clang function pointer type warnings in v14, v15
Previous Message Tatsuo Ishii 2024-07-12 03:20:20 Re: Optimize WindowAgg's use of tuplestores