From: Jonathan Wakely Date: Fri, 4 Feb 2022 19:42:19 +0000 (+0000) Subject: libstdc++: Allow Clang to use before C++23 X-Git-Tag: upstream/12.2.0~1633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d1aabb60ec66bffbc9a3269f6ca85150f259564;p=platform%2Fupstream%2Fgcc.git libstdc++: Allow Clang to use before C++23 There is code that only expects to be compiled with clang++ and uses its , which works because Clang supports the _Atomic specifier in C++. The addition of to libstdc++ broke this code, as now it finds the C++ header instead, which is empty for any standard mode before C++23. This change allows that code to keep working as before, by forwarding to clang's . libstdc++-v3/ChangeLog: * include/c_compatibility/stdatomic.h [__clang__]: Use #include_next . --- diff --git a/libstdc++-v3/include/c_compatibility/stdatomic.h b/libstdc++-v3/include/c_compatibility/stdatomic.h index 852574b..95c7261 100644 --- a/libstdc++-v3/include/c_compatibility/stdatomic.h +++ b/libstdc++-v3/include/c_compatibility/stdatomic.h @@ -120,5 +120,7 @@ using std::atomic_flag_clear_explicit; using std::atomic_thread_fence; using std::atomic_signal_fence; +#elif defined __clang__ +# include_next #endif // C++23 #endif // _GLIBCXX_STDATOMIC_H