From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: C11 / VS 2019 |
Date: | 2025-07-01 08:31:38 |
Message-ID: | e5488fe3-38d5-4b1f-ae0d-a254dc969f16@eisentraut.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04.06.25 08:15, Peter Eisentraut wrote:
> On 03.06.25 06:51, Michael Paquier wrote:
>> Dropping VS 2015 and going up to VS 2019 brings other benefits,
>> __VA_ARGS__ coming in mind.
>
> Yes, this was going to be my next step. As we're already talking about
> it, here is my proposed patch.
>
> For an explanation, the background is that MSVC has a "traditional"
> preprocessor and a new "conforming" one. The latter is available
> starting in VS 2019, but it's not the default. We have some code,
> especially around __VA_ARGS__ that specifically caters to this
> traditional preprocessor.
>
> Turning on C11 mode in MSVC (/std:c11) automatically turns on the
> conforming preprocessor, which would currently break compilation on MSVC
> because the code expects it to be in traditional mode.
>
> So my first patch is that we fix that bit and turn on just the
> conforming preprocessor (/Zc:preprocessor), without turning on C11 yet.
> That way, we get that part out of the way, and we update the
> documentation about requiring VS 2019. (And we'd flush out anyone who
> might still be running pre-VS-2019 build jobs somewhere.) Later, when
> we turn on C11, we can remove the explicit /Zc:preprocessor option again.
>
> (An alternative approach would be to turn on C11 and add another option
> to explicitly turn the traditional preprocessor back on, but that seems
> pointless, and the documentation also suggests that that combination is
> not well supported.)
>
> So the attached patch is my proposal to commit early in PG19.
I have committed this.
From | Date | Subject | |
---|---|---|---|
Next Message | Rintaro Ikeda | 2025-07-01 08:43:18 | Re: Suggestion to add --continue-client-on-abort option to pgbench |
Previous Message | Peter Eisentraut | 2025-07-01 08:29:29 | Re: TOAST versus toast |