[committed] libstdc++: Restore braces around body of if-statement

Jonathan Wakely jwakely@redhat.com
Wed Dec 17 13:45:21 GMT 2025


libstdc++-v3/ChangeLog:

	* include/bits/random.tcc [_GLIBCXX_USE_OLD_GENERATE_CANONICAL]
	(generate_canonical): Restore braces around statement.
---

Tested x86_64-linux. Pushed to trunk.

 libstdc++-v3/include/bits/random.tcc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index 053307519b4b..c3b4776d3580 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -3733,12 +3733,14 @@ namespace __detail
 	}
       __ret = __sum / __tmp;
       if (__builtin_expect(__ret >= _RealType(1), 0))
+	{
 # if _GLIBCXX_USE_C99_MATH_FUNCS
 	  __ret = std::nextafter(_RealType(1), _RealType(0));
 # else
 	  __ret = _RealType(1)
 	    - std::numeric_limits<_RealType>::epsilon() / _RealType(2);
 # endif
+	}
       return __ret;
     }
 
-- 
2.52.0



More information about the Libstdc++ mailing list