You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interlockedexchange is defined for long volatile * while MLOCK_T is defined as int.
Since clang tries to be kind of compatible to MSVC here, the GNUC checks earlier on fail, so it uses the Win32 implementation with interlockedexchange. MSVC did not seem to mind or the warning has been silenced.
Clang from MinGW selects another implementation, which also avoids the warning.
To resolve this issue, I see two approaches:
define MLOCK_T to volatile long if using the interlockedexchange-based implementation
cast sl to long volatile* when using it: #define CAS_LOCK(sl) interlockedexchange((LONG volatile*)sl, (LONG)1)
This warning occurs when building with Clang from Visual Studio (using CMake). This affects
Using clang from MinGW or MSVC without Clang does not emit these warnings.
Build log: https://pastebin.com/zQes4tph
The text was updated successfully, but these errors were encountered: