[gcc r16-6203] libstdc++: Fix up all_pedantic_errors.cc
Jakub Jelinek
jakub@gcc.gnu.org
Wed Dec 17 08:49:15 GMT 2025
https://gcc.gnu.org/g:932d24f0c705cd647a4f565e41c5dccfaf7b6051
commit r16-6203-g932d24f0c705cd647a4f565e41c5dccfaf7b6051
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Dec 17 09:16:46 2025 +0100
libstdc++: Fix up all_pedantic_errors.cc
On x86_64-linux I see
On x86_64-linux
FAIL: 17_intro/headers/c++1998/all_pedantic_errors.cc -std=gnu++17 (test for excess errors)
Excess errors:
/home/jakub/src/gcc/obj20/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/random.tcc:3681: error: ISO C++ does not support '__int128' for 'type name' [-Wpedantic]
/home/jakub/src/gcc/obj20/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/random.tcc:3698: error: ISO C++ does not support '__int128' for 'type name' [-Wpedantic]
This fixes it by adding __extension__.
2025-12-17 Jakub Jelinek <jakub@redhat.com>
* include/bits/random.tcc (std::generate_canonical): Use
__extension__ before __generate_canonical_{pow2,any} calls with
unsigned __int128 template arguments.
Diff:
---
libstdc++-v3/include/bits/random.tcc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index 38e8645c88cb..e102e99eeb22 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -3677,7 +3677,7 @@ namespace __detail
{
#if defined(__SIZEOF_INT128__)
// Accommodate double double or float128.
- return __generate_canonical_pow2<
+ return __extension__ __generate_canonical_pow2<
_RealT, unsigned __int128, __d>(__urng);
#else
static_assert(false,
@@ -3694,7 +3694,7 @@ namespace __detail
#if defined(__SIZEOF_INT128__)
static_assert(__d <= 64,
"irregular RNG with float precision >64 is not supported");
- return __generate_canonical_any<
+ return __extension__ __generate_canonical_any<
_RealT, unsigned __int128, __d>(__urng);
#else
static_assert(false, "irregular RNG with float precision"
More information about the Libstdc++-cvs
mailing list