Re: cpluspluscheck complains about use of register

From: "Tristan Partin" <tristan(at)partin(dot)io>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Christoph Berg" <myon(at)debian(dot)org>, "Andres Freund" <andres(at)anarazel(dot)de>, <pgsql-hackers(at)postgresql(dot)org>, "Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: cpluspluscheck complains about use of register
Date: 2024-10-25 20:24:46
Message-ID: D5562S703B88.1I3GD4TNXHN8E@partin.io
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri Oct 25, 2024 at 3:19 PM CDT, Tom Lane wrote:
> "Tristan Partin" <tristan(at)partin(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2024-10-25 20:38:01 Re: proposal: schema variables
Previous Message Tom Lane 2024-10-25 20:19:25 Re: cpluspluscheck complains about use of register