Re: Enable -Wstrict-prototypes and -Wold-style-definition by default

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
Date: 2026-04-08 15:14:35
Message-ID: e8257a88-3b29-4283-909d-3be1f5d9dff0@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-04-08 We 8:51 AM, Peter Eisentraut wrote:
> On 06.04.26 23:19, Tom Lane wrote:
>> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
>>> The first three patches have been committed.
>>
>> b4a132022 has had some not-so-desirable effects in the buildfarm:
>> drongo and hoatzin are each spewing a couple dozen repetitive
>> warnings about every bison-generated header file, eg
>>
>> src/backend/bootstrap/bootparse.h(111): warning C4255:
>> 'boot_yyparse': no function prototype given: converting '()' to '(void)'
>>
>> Both of those machines are using bison 2.7, which is pretty old
>> and evidently isn't careful about generating complete prototypes.
>>
>> I'm not sure if there's anything to be done about this, except
>> perhaps nag the animals' owners to find a newer bison somewhere.
>> We could revert b4a132022, but then we might miss valid warnings
>> about such issues in Windows-only code.
>
> Let's try the nagging route.
>
> I found it especially curious that hoatzin is a relatively new member,
> so why is it running this ancient Bison version?  Looking at the
> Chocolatey packages:
>
> https://community.chocolatey.org/packages?q=bison
>
> it appears that
>
>     choco install winflexbison
>
> gives you the old version, and you need
>
>     choco install winflexbison3
>
> to get a newer version.  So it seems easy to fall into that "trap" if
> you don't pay attention.
>
> So perhaps these buildfarm members could update their Bison version
> sometime.
>
> I found one mention of this command in our wiki
> (https://wiki.postgresql.org/wiki/Meson#Windows) which I updated.  If
> we find any other documents or guides with these commands, we should
> try to get them updated, too.

drongo is updated

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ylshiyu@126.com 2026-04-08 15:46:59 Re: dlist_check: add check for nodes pointing to themselves
Previous Message Andres Freund 2026-04-08 15:13:14 Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?