From: Jonathan Wakely Date: Thu, 20 Mar 2025 18:47:33 +0000 (+0000) Subject: libstdc++: Fix std.compat exports of and X-Git-Tag: basepoints/gcc-16~1067 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62;p=thirdparty%2Fgcc.git libstdc++: Fix std.compat exports of and libstdc++-v3/ChangeLog: * src/c++23/std.compat.cc.in: Only export and contents for C++26 and later. Reviewed-by: Tomasz KamiƄski --- diff --git a/libstdc++-v3/src/c++23/std.compat.cc.in b/libstdc++-v3/src/c++23/std.compat.cc.in index ba7ed0312ab..344502195b1 100644 --- a/libstdc++-v3/src/c++23/std.compat.cc.in +++ b/libstdc++-v3/src/c++23/std.compat.cc.in @@ -21,11 +21,15 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -export module std.compat; -export import std; +module; #include +#include + +export module std.compat; +export import std; +#ifdef __STDC_VERSION_STDBIT_H__ // export { @@ -52,7 +56,9 @@ _GLIBCXX_STDBIT_FUNC(stdc_bit_floor); _GLIBCXX_STDBIT_FUNC(stdc_bit_ceil); #undef _GLIBCXX_STDBIT_FUNC } +#endif +#ifdef __STDC_VERSION_STDCKDINT_H__ // export { @@ -60,6 +66,7 @@ export using __gnu_cxx::ckd_sub; using __gnu_cxx::ckd_mul; } +#endif #define STD_COMPAT 1