Re: C11 / VS 2019 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: C11 / VS 2019
Date
Msg-id f6c67dfb-5b6f-41ee-9310-b53ac7adaf84@dunslane.net
Whole thread Raw
In response to Re: C11 / VS 2019  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: C11 / VS 2019
List pgsql-hackers


On 2025-07-08 Tu 4:10 PM, Andrew Dunstan wrote:

On 2025-07-08 Tu 3:45 PM, Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
It's done and running. Testing before I re-enabled the animal it shows
it was happy.
In the no-good-deed-goes-unpunished department ... drongo is now spewing
a boatload of these warnings:

C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\um\\winbase.h(9305): warning C5105: macro expansion producing 'defined' has undefined behavior

Looks like this comes out once per .c file -- probably it's
in an inclusion from <windows.h>.  Dunno if there's anything
we can do but ignore it.  I wonder though why we have not seen
this on other buildfarm animals.

           


*sigh*


will investigate.




No grand insights yet. I note that this is not occurring on the back branches.

Here's the MS page describing the error: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5105?view=msvc-170

The relevant portion of the winbase.h file appears to be:

/*
To turn off/hide the contents of this file:
 #define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0
*/

#if !defined(MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS)
#define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS (_WIN32_WINNT >= 0x0502 || !defined(_WINBASE_))
#endif

#if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS  /* { */


The last line is 9305.

I don't think we have any other VS 2019 machines in the buildfarm. I can try installing VS 2022, which hamerkop seems to be running without producing the error.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TransactionIdIsActive() has long been unused
Next
From: Tom Lane
Date:
Subject: Re: C11 / VS 2019