Re: cpluspluscheck complains about use of register - Mailing list pgsql-hackers

From Tristan Partin
Subject Re: cpluspluscheck complains about use of register
Date
Msg-id D5562S703B88.1I3GD4TNXHN8E@partin.io
Whole thread Raw
In response to Re: cpluspluscheck complains about use of register  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: cpluspluscheck complains about use of register
Next
From: Masahiko Sawada
Date:
Subject: Re: Fix for consume_xids advancing XIDs incorrectly