Re: C11 / VS 2019
От | Peter Eisentraut |
---|---|
Тема | Re: C11 / VS 2019 |
Дата | |
Msg-id | e5488fe3-38d5-4b1f-ae0d-a254dc969f16@eisentraut.org обсуждение исходный текст |
Ответ на | Re: C11 / VS 2019 (Peter Eisentraut <peter@eisentraut.org>) |
Список | 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.
В списке pgsql-hackers по дате отправления: