https://gcc.gnu.org/g:d5cd0663e80ccdff2c82652a0aa559efc8bf3859

commit r17-1776-gd5cd0663e80ccdff2c82652a0aa559efc8bf3859
Author: Jonathan Wakely <[email protected]>
Date:   Tue Jun 16 14:51:53 2026 +0100

    libstdc++: Use const void* for parameters of some internal helpers 
[PR125684]
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/125684
            * src/c++11/random.cc (bad_seed, which_source): Change void*
            parameters to const void *.

Diff:
---
 libstdc++-v3/src/c++11/random.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/src/c++11/random.cc b/libstdc++-v3/src/c++11/random.cc
index 2f37fd5b88ea..5390f05a4a56 100644
--- a/libstdc++-v3/src/c++11/random.cc
+++ b/libstdc++-v3/src/c++11/random.cc
@@ -197,7 +197,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
 #ifdef USE_LCG
     // TODO: use this to seed std::mt19937 engine too.
     unsigned
-    bad_seed(void* p) noexcept
+    bad_seed(const void* p) noexcept
     {
       // Poor quality seed based on hash of the current time and the address
       // of the object being seeded. Better than using the same default seed
@@ -253,7 +253,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
 
     inline Which
     which_source(random_device::result_type (*func [[maybe_unused]])(void*),
-                void* file [[maybe_unused]])
+                const void* file [[maybe_unused]])
     {
 #ifdef _GLIBCXX_USE_CRT_RAND_S
       if (func == &__winxp_rand_s)

Reply via email to