On Mon, 4 Aug 2025, LIU Hao wrote:
Previously, these caused errors when compiled as C++:
In file included from test1.cpp:1:
C:/MSYS64/ucrt64/include/ddk/wdm.h:205:1: error: 'BOOLEAN
InterlockedBitTestAndSet(volatile LONG*, LONG)' redeclared inline without
'gnu_inline' attribute
205 | InterlockedBitTestAndSet(
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/MSYS64/ucrt64/include/intrin.h:41,
from C:/MSYS64/ucrt64/include/ddk/wdm.h:68:
C:/MSYS64/ucrt64/include/psdk_inc/intrin-impl.h:1850:1: note: 'unsigned
char InterlockedBitTestAndSet(volatile long int*, long int)' previously
defined here
1850 | __buildbittesti(InterlockedBitTestAndSet, __LONG32, "lock bts{l
%[Offset],%[Base] | %[Base],%[Offset]}" __FLAGSET, "I")
| ^~~~~~~~~~~~~~~
C:/MSYS64/ucrt64/include/ddk/wdm.h:224:1: error: 'BOOLEAN
InterlockedBitTestAndReset(volatile LONG*, LONG)' redeclared inline without
'gnu_inline' attribute
224 | InterlockedBitTestAndReset(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/MSYS64/ucrt64/include/psdk_inc/intrin-impl.h:1859:1: note: 'unsigned
char InterlockedBitTestAndReset(volatile long int*, long int)' previously
defined here
1859 | __buildbittesti(InterlockedBitTestAndReset, __LONG32, "lock btr{l
%[Offset],%[Base] | %[Base],%[Offset]}" __FLAGSET, "I")
| ^~~~~~~~~~~~~~~
When compiled as C, the static definitions were treated as external ones and
caused linker errors instead.
This fixes https://github.com/mingw-w64/mingw-w64/issues/111.
Signed-off-by: LIU Hao <lh_mo...@126.com>
---
mingw-w64-headers/ddk/include/ddk/wdm.h | 45 -------------------------
1 file changed, 45 deletions(-)
LGTM, thanks.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public