From: Jakub Jelinek Date: Wed, 17 Dec 2025 08:16:46 +0000 (+0100) Subject: libstdc++: Fix up all_pedantic_errors.cc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=932d24f0c705cd647a4f565e41c5dccfaf7b6051;p=thirdparty%2Fgcc.git 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 * include/bits/random.tcc (std::generate_canonical): Use __extension__ before __generate_canonical_{pow2,any} calls with unsigned __int128 template arguments. --- diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index 38e8645c88c..e102e99eeb2 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"