Closed
Description
Issue description
When attempting to build the apple/swift-atomics
library with C++ interoperability enabled, several errors are encountered in the _AtomicsShims.h
header file. These errors prevent the library from being built successfully.
Steps to reproduce
- Use the
apple/swift-atomics
package in a target using SwiftPM. - Configure the build with C++ interoperability enabled.
- Attempt to build the library.
Expected behavior
The library should build successfully with C++ interoperability enabled. The library should correctly detect that C++ inter is enabled instead of blindly assuming that interoperability will be C/Objective-C
Actual behavior
Several errors are encountered in the _AtomicsShims.h
header file, preventing the library from being built successfully.
Error messages
swift-atomics/Sources/_AtomicsShims/include/_AtomicsShims.h:227:1: Cannot initialize a member subobject of type '_Atomic(_sa_dword)' with an rvalue of type '_Atomic(_sa_dword)'
swift-atomics/Sources/_AtomicsShims/include/_AtomicsShims.h:227:1: No viable conversion from returned value of type '_Atomic(_sa_dword)' to function return type '_sa_dword'
Could not build Objective-C module '_AtomicsShims'
Environment
- Operating system: macOS 14.0 Sonoma
- Compiler: Apple Swift version 5.9