Re: Weirdness with clang and stdatomic.h on Rawhide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 3 Feb 2022 at 20:27, Ron Olson <tachoknight@xxxxxxxxx> wrote:
>
> 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.

That will fail miserably with GCC, because the C library's
<stdatomic.h> cannot be included in C++ (because it uses C features
that are not valid in C++).

But I'll test:

#elif defined __clang__
#include_next <stdatomic.h>
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux