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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Date: 2022-12-12 03:07:05
Message-ID: 1914802.1670814425@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-12-12 03:08:51 Re: Improve WALRead() to suck data directly from WAL buffers when possible
Previous Message Kyotaro Horiguchi 2022-12-12 03:06:36 Re: Improve WALRead() to suck data directly from WAL buffers when possible