[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;
}
- [lmi-commits] [lmi] master updated (01aa1fd4 -> cf4a05dc), Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master b4fcdefc 1/6: Fix defect introduced 20220525T0000Z: careless pasting, Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master 3a5c416d 5/6: Reenable a warning and resolve its cause, Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master 48a9920b 2/6: Fix defect introduced 20201007T2134Z: dead code, Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master e7a672bf 4/6: Refactor, Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master 3d6bbdc6 3/6: Fix defect introduced 20200608T2219Z: dead code, Greg Chicares, 2022/06/29
- [lmi-commits] [lmi] master cf4a05dc 6/6: Remove a class of gcc-warning exceptions,
Greg Chicares <=