Re: headerscheck warnings with late-model gcc

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2025-08-06T18:25:56Z
Lists: pgsql-hackers
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: why would
> they have turned on -Wmissing-variable-declarations by default
> for C but not C++?  But anyway, since there doesn't seem to be
> any C++ compatibility issue here, I think it's sufficient to fix
> this in master and not back-patch.

-Wmissing-variable-declarations is added by us as of PG18 (commit 
66188912566).  It's available since gcc 14 and doesn't exist for C++.



Commits

  1. Silence -Wmissing-variable-declarations in headerscheck.

  2. headerscheck: Document that --with-llvm is required

  3. headerscheck: Ignore Windows-specific header

  4. headerscheck: Use ICU_CFLAGS

  5. Add -Wmissing-variable-declarations to the standard compilation flags