Re: cpluspluscheck complains about use of register

Tristan Partin <tristan@partin.io>

From: "Tristan Partin" <tristan@partin.io>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Christoph Berg" <myon@debian.org>, "Andres Freund" <andres@anarazel.de>, <pgsql-hackers@postgresql.org>, "Fabien COELHO" <coelho@cri.ensmp.fr>
Date: 2024-10-25T20:24:46Z
Lists: pgsql-hackers
On Fri Oct 25, 2024 at 3:19 PM CDT, Tom Lane wrote:
> "Tristan Partin" <tristan@partin.io> writes:
>> FWIW, I ran into this compiling an extension written in C++ for v15, so 
>> I'll throw my support for backpatching this if that is still on the 
>> table. Understandable if not, though.
>
> I'm inclined to think "too late".  Even if we back-patched to v15
> and earlier now, your extension would probably still want to be
> compilable against earlier minor releases, so the back-patch
> would not help you a lot.  Christoph's workaround of
> "#define register" is probably the best answer for old PG versions,
> or you can compile with "-Wno-register".

For my purposes, I only need to support the latest minor releases of PG 
versions, so a backpatch would be useful come December (?). I do 
understand the "too late" argument though.

We did indeed fix the problem with "-Wno-register," though it's always 
nice to not have the manual fix. But hey, Postgres is a C project, so 
it's all good 😄. Thanks for getting back to me, Tom.

-- 
Tristan Partin
Neon (https://neon.tech)