diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-03-20 18:47:33 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-03-21 09:32:21 +0000 |
commit | ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62 (patch) | |
tree | 9d05d4a60399363acbf3d1ba38d91883f6c02db4 | |
parent | ced873be918186a98d69dcdd89bb0240973b0f1a (diff) | |
download | gcc-ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62.zip gcc-ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62.tar.gz gcc-ff3343518ae6e1aa1efe7fe02a6a4c6cb24f3b62.tar.bz2 |
libstdc++: Fix std.compat exports of <stdbit.h> and <stdckdint.h>
libstdc++-v3/ChangeLog:
* src/c++23/std.compat.cc.in: Only export <stdbit.h> and
<stdckdint.h> contents for C++26 and later.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
-rw-r--r-- | libstdc++-v3/src/c++23/std.compat.cc.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++23/std.compat.cc.in b/libstdc++-v3/src/c++23/std.compat.cc.in index ba7ed03..3445021 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 // <http://www.gnu.org/licenses/>. -export module std.compat; -export import std; +module; #include <stdbit.h> +#include <stdckdint.h> + +export module std.compat; +export import std; +#ifdef __STDC_VERSION_STDBIT_H__ // <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__ // <stdckdint.h> export { @@ -60,6 +66,7 @@ export using __gnu_cxx::ckd_sub; using __gnu_cxx::ckd_mul; } +#endif #define STD_COMPAT 1 |