Blame SOURCES/gcc8-pr99536.patch

2df340
commit 29dad307b5d7cfdb6626c11c8e43ebff941c950b
2df340
Author: Jonathan Wakely <jwakely@redhat.com>
2df340
Date:   Thu Mar 11 16:43:51 2021 +0000
2df340
2df340
    libstdc++: Initialize std::normal_distribution::_M_saved [PR 99536]
2df340
    
2df340
    This avoids a false positive -Wmaybe-uninitialized warning, by
2df340
    initializing _M_saved on construction.
2df340
    
2df340
    libstdc++-v3/ChangeLog:
2df340
    
2df340
            PR libstdc++/99536
2df340
            * include/bits/random.h (normal_distribution): Use
2df340
            default-initializer for _M_saved and _M_saved_available.
2df340
    
2df340
    (cherry picked from commit 67e397660611990efd98f9e4106c1ee81f6803a4)
2df340
2df340
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
2df340
index b36781ed290..3385345d273 100644
2df340
--- a/libstdc++-v3/include/bits/random.h
2df340
+++ b/libstdc++-v3/include/bits/random.h
2df340
@@ -1974,12 +1974,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
2df340
       explicit
2df340
       normal_distribution(result_type __mean = result_type(0),
2df340
 			  result_type __stddev = result_type(1))
2df340
-      : _M_param(__mean, __stddev), _M_saved_available(false)
2df340
+      : _M_param(__mean, __stddev)
2df340
       { }
2df340
 
2df340
       explicit
2df340
       normal_distribution(const param_type& __p)
2df340
-      : _M_param(__p), _M_saved_available(false)
2df340
+      : _M_param(__p)
2df340
       { }
2df340
 
2df340
       /**
2df340
@@ -2158,8 +2158,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
2df340
 			const param_type& __p);
2df340
 
2df340
       param_type  _M_param;
2df340
-      result_type _M_saved;
2df340
-      bool        _M_saved_available;
2df340
+      result_type _M_saved = 0;
2df340
+      bool        _M_saved_available = false;
2df340
     };
2df340
 
2df340
   /**