Re: headerscheck warnings with late-model gcc - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: headerscheck warnings with late-model gcc
Date
Msg-id 331f9ea7-8ddc-40c6-8a36-3e8994d3d3b3@eisentraut.org
Whole thread Raw
In response to Re: headerscheck warnings with late-model gcc  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: headerscheck warnings with late-model gcc
List pgsql-hackers
On 06.08.25 21:11, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> On 05.08.25 20:09, Tom Lane wrote:
>>> Curiously, no such complaints appear with cpluspluscheck (which is
>>> using g++ 15.1.1).  I don't really understand why not ...
> 
>> -Wmissing-variable-declarations is added by us as of PG18 (commit
>> 66188912566).  It's available since gcc 14 and doesn't exist for C++.
> 
> Oh!  Okay, that explains the lack of messages, but it still seems
> like an odd omission.

Yeah, this is pretty much my fault for not checking this for the above 
commit.

I've been having a hard time getting headerscheck to work reliably in my 
environment, so I ended up relying on CI, which doesn't have new-enough 
compilers yet (and/or doesn't run it everywhere; the clang on the 
FreeBSD task might have caught it (but we also don't have this 
integrated with meson yet)).

Attached are three patches to fix some unrelated problems with 
headerscheck in my environment.

The fourth one is to fix the ecpg issue; I think we can ignore it under 
the "code fragment" category.

kwlist_d.h doesn't show up in my run, probably because I'm using a 
separate build directory, which headerscheck doesn't handle?  Another 
thing to fix.  But I guess it would also fall under the code fragment 
category?

But the code fragment exception is also faulty, because we plausibly do 
want to check that file for C++ compatibility, just not necessarily as a 
standalone file.  Not sure how to cover all these bases at once.
Attachment

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: VM corruption on standby
Next
From: Amul Sul
Date:
Subject: pg_waldump: support decoding of WAL inside tarfile