Re: headerscheck warnings with late-model gcc

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: headerscheck warnings with late-model gcc
Date: 2025-08-07 14:15:19
Message-ID: 331f9ea7-8ddc-40c6-8a36-3e8994d3d3b3@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.08.25 21:11, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)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 Content-Type Size
0001-headerscheck-Use-ICU_CFLAGS.patch text/plain 1.5 KB
0002-headerscheck-Ignore-llvmjit_backport.h.patch text/plain 1006 bytes
0003-headerscheck-Ignore-Windows-specific-header.patch text/plain 1.5 KB
0004-headerscheck-Ignore-ecpg-test-header.patch text/plain 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2025-08-07 14:17:08 pg_waldump: support decoding of WAL inside tarfile
Previous Message Aleksander Alekseev 2025-08-07 14:14:00 Re: VM corruption on standby