lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master cf4a05dc 6/6: Remove a class of gcc-warning e


From: Greg Chicares
Subject: [lmi-commits] [lmi] master cf4a05dc 6/6: Remove a class of gcc-warning exceptions
Date: Wed, 29 Jun 2022 11:11:35 -0400 (EDT)

branch: master
commit cf4a05dc7b4238387347a4b811a738a77c7b4f40
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Remove a class of gcc-warning exceptions
    
    Following the strategy used for fdlibm functions, suppressed a gcc
    warning with a pragma, instead of modifying compilation flags.
---
 compiler_gcc_warnings.make | 7 -------
 round_glibc.c              | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/compiler_gcc_warnings.make b/compiler_gcc_warnings.make
index 29713eaf..41ccd165 100644
--- a/compiler_gcc_warnings.make
+++ b/compiler_gcc_warnings.make
@@ -231,13 +231,6 @@ $(cgicc_objects): gcc_common_extra_warnings += \
   -Wno-conversion \
   -Wno-zero-as-null-pointer-constant \
 
-# SOMEDAY !! Address some of these '-Wconversion' issues.
-
-wno_conv_objects := \
-  round_glibc.o \
-
-$(wno_conv_objects): gcc_common_extra_warnings += -Wno-conversion 
-Wfloat-conversion
-
 wno_sign_conv_objects := \
   crc32.o \
   getopt.o \
diff --git a/round_glibc.c b/round_glibc.c
index 37d17729..ec06738e 100644
--- a/round_glibc.c
+++ b/round_glibc.c
@@ -380,7 +380,14 @@ long double roundl(long double x)
       i1 &= ~i;
     }
 
+#if defined LMI_GCC
+#   pragma GCC diagnostic push
+#   pragma GCC diagnostic ignored "-Wconversion"
+#endif // defined LMI_GCC
   SET_LDOUBLE_WORDS (x, se, i0, i1);
+#if defined LMI_GCC
+#   pragma GCC diagnostic pop
+#endif // defined LMI_GCC
   return x;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]