Issue |
123457
|
Summary |
clang-cl - Conflicting types for atomic_signal_fence
|
Labels |
new issue
|
Assignees |
|
Reporter |
Neumann-A
|
LLVM: 19.1.6
MSVC: 17.12.3
```
D:\installed\x64-windows\compiler-llvm\bin\clang-cl.exe -TP -DNOMINMAX -DQJp2Plugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_NO_AS_CONST=1 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_PLUGIN -DQT_USE_QSTRINGBUILDER -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -ID:\b\qtimageformats\x64-windows-static-rel\src\plugins\imageformats\jp2\QJp2Plugin_autogen\include -ID:\b\qtimageformats\src\here-src-6-3afc88f6f5.clean\src\plugins\imageformats\jp2 -ID:\b\qtimageformats\x64-windows-static-rel\src\plugins\imageformats\jp2 -ID:\b\qtimageformats\x64-windows-static-rel\include -imsvcD:\installed\x64-windows\VS\VC\Tools\MSVC\14.42.34433\include -imsvcD:\installed\x64-windows\VS\VC\Tools\MSVC\14.42.34433\ATLMFC\include -imsvcD:\installed\x64-windows\VS\VC\Auxiliary\VS\include -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\10\include\10.0.26100.0\ucrt" -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\10\include\10.0.26100.0\um" -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\10\include\10.0.26100.0\shared" -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\10\include\10.0.26100.0\winrt" -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\10\include\10.0.26100.0\cppwinrt" -imsvc"D:\installed\x64-windows\WinSDK\Windows Kits\NETFXSDK\4.8.1\include\um" -imsvcD:\installed\x64-windows-static\include -imsvcD:\installed\x64-windows-static\include\Qt6\QtCore -imsvcD:\installed\x64-windows-static\include\Qt6 -imsvcD:\installed\x64-windows-static\share\Qt6\mkspecs\win32-clang-msvc -imsvcD:\installed\x64-windows-static\include\Qt6\QtGui /nologo /DWIN32 /D_WINDOWS -Wno-implicit-function-declaration /utf-8 -msse4.2 -m64 /GR /EHsc /MD /O2 /Oi /Gy /DNDEBUG /Z7 -std:c++17 -MD /W3 /EHs-c- /wd4530 /wd4577 -Wno-ignored-attributes -ftrivial-auto-var-init=pattern /showIncludes /Fosrc\plugins\imageformats\jp2\CMakeFiles\QJp2Plugin.dir\qjp2handler.cpp.obj /Fdsrc\plugins\imageformats\jp2\CMakeFiles\QJp2Plugin.dir\ -c -- D:\b\qtimageformats\src\here-src-6-3afc88f6f5.clean\src\plugins\imageformats\jp2\qjp2handler.cpp
In file included from D:\b\qtimageformats\src\here-src-6-3afc88f6f5.clean\src\plugins\imageformats\jp2\qjp2handler.cpp:12:
In file included from D:\installed\x64-windows-static\include\jasper/jasper.h:78:
In file included from D:\installed\x64-windows-static\include\jasper/jas_init.h:73:
In file included from D:\installed\x64-windows-static\include\jasper/jas_malloc.h:81:
In file included from D:\installed\x64-windows-static\include\jasper/jas_thread.h:89:
D:\installed\x64-windows\compiler-llvm\lib\clang\19\include\stdatomic.h(82,6): error: conflicting types for 'atomic_thread_fence'
82 | void atomic_thread_fence(memory_order);
| ^
D:\installed\x64-windows\VS\VC\Tools\MSVC\14.42.34433\include\atomic(308,36): note: previous definition is here
308 | _EXPORT_STD extern "C" inline void atomic_thread_fence(const memory_order _Order) noexcept {
| ^
In file included from D:\b\qtimageformats\src\here-src-6-3afc88f6f5.clean\src\plugins\imageformats\jp2\qjp2handler.cpp:12:
In file included from D:\installed\x64-windows-static\include\jasper/jasper.h:78:
In file included from D:\installed\x64-windows-static\include\jasper/jas_init.h:73:
In file included from D:\installed\x64-windows-static\include\jasper/jas_malloc.h:81:
In file included from D:\installed\x64-windows-static\include\jasper/jas_thread.h:89:
D:\installed\x64-windows\compiler-llvm\lib\clang\19\include\stdatomic.h(83,6): error: conflicting types for 'atomic_signal_fence'
83 | void atomic_signal_fence(memory_order);
| ^
D:\installed\x64-windows\VS\VC\Tools\MSVC\14.42.34433\include\atomic(312,36): note: previous definition is here
312 | _EXPORT_STD extern "C" inline void atomic_signal_fence(const memory_order _Order) noexcept {
| ^
2 errors generated.
```
Adding a `#ifndef _MSC_VER` around the two `atomic_` functions makes the code compile but I don't know if that is the correct fix.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs