Skip to content

Headers: exclude #include_next <stdatomic.h> on MSVC #3579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

compnerd
Copy link
Member

The 14.31.30818 toolset has the following in the stdatomic.h:

 #ifndef __cplusplus
 #error <stdatomic.h> is not yet supported when compiling as C, but this is planned for a future release.
 #endif

This results in clang failing to build existing code which relied on
stdatomic.h in C mode on Windows. Simply fallback to the clang header
until that header is available as a complete implementation.

(cherry picked from commit 1ad7de9)

The 14.31.30818 toolset has the following in the `stdatomic.h`:
~~~
 #ifndef __cplusplus
 #error <stdatomic.h> is not yet supported when compiling as C, but this is planned for a future release.
 #endif
~~~

This results in clang failing to build existing code which relied on
`stdatomic.h` in C mode on Windows.  Simply fallback to the clang header
until that header is available as a complete implementation.

(cherry picked from commit 1ad7de9)
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @bnbarham

@bnbarham
Copy link

Thanks for the cherry-pick @compnerd! I'm happy to merge this if it's needed for Windows, the test failures are all already known.

@compnerd
Copy link
Member Author

Sounds good, let;s go ahead and merge this then.

@compnerd compnerd merged commit 95ee21e into swiftlang:stable/20211026 Nov 30, 2021
@compnerd compnerd deleted the atomic-rebranch branch November 30, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants