[libc-commits] [libc] 0ecb983 - [libc] suppress uninitialized werrors (#98710)

via libc-commits libc-commits at lists.llvm.org
Fri Jul 12 21:14:53 PDT 2024


Author: Schrodinger ZHU Yifan
Date: 2024-07-12T21:14:50-07:00
New Revision: 0ecb98397bf6cf5fc00cb8649deddb0e80197f90

URL: https://github.com/llvm/llvm-project/commit/0ecb98397bf6cf5fc00cb8649deddb0e80197f90
DIFF: https://github.com/llvm/llvm-project/commit/0ecb98397bf6cf5fc00cb8649deddb0e80197f90.diff

LOG: [libc] suppress uninitialized werrors (#98710)

suppress uninitialized werrors when building with gcc

Added: 
    

Modified: 
    libc/src/math/generic/tan.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/math/generic/tan.cpp b/libc/src/math/generic/tan.cpp
index a3bc972ef9c59..e623adb6b1d1e 100644
--- a/libc/src/math/generic/tan.cpp
+++ b/libc/src/math/generic/tan.cpp
@@ -150,7 +150,7 @@ LLVM_LIBC_FUNCTION(double, tan, (double x)) {
 
   DoubleDouble y;
   unsigned k;
-  generic::LargeRangeReduction<NO_FMA> range_reduction_large;
+  generic::LargeRangeReduction<NO_FMA> range_reduction_large{};
 
   // |x| < 2^32 (with FMA) or |x| < 2^23 (w/o FMA)
   if (LIBC_LIKELY(x_e < FPBits::EXP_BIAS + FAST_PASS_EXPONENT)) {
@@ -160,7 +160,7 @@ LLVM_LIBC_FUNCTION(double, tan, (double x)) {
       if (LIBC_UNLIKELY(x == 0.0))
         return x;
 
-      // For |x| < 2^-27, |tan(x) - x| < ulp(x)/2.
+        // For |x| < 2^-27, |tan(x) - x| < ulp(x)/2.
 #ifdef LIBC_TARGET_CPU_HAS_FMA
       return fputil::multiply_add(x, 0x1.0p-54, x);
 #else


        


More information about the libc-commits mailing list