Here’s a question: what if the following was added to stdatomic.h at the end of 
the file:

#else
#include_next <stdatomic.h>
#endif // C++23

Since the rest of the file is gated by C++23, this allows C++ programs that 
reference this header to have a chance to pick up the Clang one, if it exists. 
If Clang isn’t installed, it doesn’t matter insofar as the C++ program is going 
to fail anyway because it hasn’t explicitly set -std=c++2b.

Just a thought.


On 1 Feb 2022, at 14:40, Jonathan Wakely wrote:

> On Tue, 1 Feb 2022 at 15:00, Ron Olson wrote:
>>
>> Well, yes and no. The code I linked to in the pastebin is what demonstrates 
>> the issue. The code in question is Apple’s libdispatch which I package 
>> separately as well as part of Swift. In that situation they’re using a C++ 
>> file that uses the underlying primitives in stdatomic in macros for their 
>> own higher-level functions, thus why stdatomic is ultimately being invoked.
>
> Does this help?
>
> https://github.com/apple/swift-corelibs-libdispatch/compare/main...jwakely:patch-1
> _______________________________________________
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
> Do not reply to spam on the list, report it: 
> https://pagure.io/fedora-infrastructure
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to