Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

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: Tree-walker callbacks vs -Wdeprecated-non-prototype
Date: 2022-12-12 03:43:41
Message-ID: CA+hUKGKtrz0S1NjAf=e76ZyvPi+JNvtJptgEdFFdtK7r4b2jnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 12, 2022 at 4:07 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > As visible on seawasp and locally (16/main branch nightly packages),
> > they decided to start warning about these casts with a new strict
> > variant of the warning. Their discussion:
>
> > https://reviews.llvm.org/D134831
>
> > There are also a few other cases unrelated to this thread's original
> > problem, for example casts involving pg_funcptr_t, HashCompareFunc. I
> > guess our options would be to turn that warning off, or reconsider and
> > try shoving the cast of "generic" arguments pointers down into the
> > functions?
>
> I'm for "turn the warning off". Per previous discussion, adhering
> strictly to that rule would make our code worse (less legible AND
> less safe), not better.

Alright, this seems to do the trick here.

Attachment Content-Type Size
0001-Disable-clang-16-s-Wcast-function-type-strict.patch text/x-patch 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-12-12 04:09:40 Re: Checksum errors in pg_stat_database
Previous Message Kyotaro Horiguchi 2022-12-12 03:08:51 Re: Improve WALRead() to suck data directly from WAL buffers when possible