https://gcc.gnu.org/g:9fcb59222423ffa9bf32f0d103e31ba38f4b8824
commit r16-6204-g9fcb59222423ffa9bf32f0d103e31ba38f4b8824 Author: Tomasz KamiĆski <[email protected]> Date: Wed Dec 17 10:32:54 2025 +0100 libstdc++: Fixed failing dg-error in random/pr60037-neg.cc tests. libstdc++-v3/ChangeLog: * include/bits/random.tcc (generate_canonical): Update error message to match pre-existing one in random.h. * testsuite/26_numerics/random/pr60037-neg.cc: Updated line for error message. Diff: --- libstdc++-v3/include/bits/random.tcc | 2 +- libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index e102e99eeb22..3c5288c2eab8 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -3651,7 +3651,7 @@ namespace __detail generate_canonical(_Urbg& __urng) { static_assert(__is_rand_dist_float_v<_RealT>, - "template argument must be floating point"); + "template argument must be a floating point type"); static_assert(__digits != 0 && _Urbg::max() > _Urbg::min(), "random samples with 0 bits are not meaningful"); static_assert(std::numeric_limits<_RealT>::radix == 2, diff --git a/libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc b/libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc index 4b36f75bba26..06d659aae94f 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc @@ -12,4 +12,4 @@ auto x = std::generate_canonical<std::size_t, // { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 271 } -// { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 3480 } +// { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 3653 }
