[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] gnulib-common: suppress -Wtautological-constant-out-of-range
From: |
Paul Eggert |
Subject: |
[PATCH 1/3] gnulib-common: suppress -Wtautological-constant-out-of-range-compare |
Date: |
Fri, 29 Dec 2023 19:22:59 -0800 |
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
-Wno-tautological-constant-out-of-range-compare to clang, as it’s
the warning is enabled by default and in portable code where type
ranges are platform dependent it is generally more trouble than
it’s worth.
---
ChangeLog | 9 +++++++++
m4/gnulib-common.m4 | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a3a10e0258..fd92a5741b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-12-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ gnulib-common: suppress -Wtautological-constant-out-of-range-compare
+ * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
+ -Wno-tautological-constant-out-of-range-compare to clang, as it’s
+ the warning is enabled by default and in portable code where type
+ ranges are platform dependent it is generally more trouble than
+ it’s worth.
+
2023-12-29 Simon Josefsson <simon@josefsson.org>
announce-gen: Improve links.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index b3852a595e..72f3f090ff 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1074,6 +1074,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-pedantic >= 4.8 >= 3.9
dnl -Wno-sign-compare >= 3 >= 3.9
dnl -Wno-sign-conversion >= 4.3 >= 3.9
+ dnl -Wno-tautological-out-of-range-compare - >= 3.9
dnl -Wno-type-limits >= 4.3 >= 3.9
dnl -Wno-undef >= 3 >= 3.9
dnl -Wno-unsuffixed-float-constants >= 4.5
@@ -1099,6 +1100,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
#if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ +
(__clang_minor__ >= 9) > 3)
-Wno-pedantic
#endif
+ #if 3 < __clang_major__ + (9 <= __clang_minor__)
+ -Wno-tautological-constant-out-of-range-compare
+ #endif
#if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ +
(__clang_minor__ >= 9) > 3)
-Wno-sign-conversion
-Wno-type-limits
--
2.40.1
- [PATCH 1/3] gnulib-common: suppress -Wtautological-constant-out-of-range-compare,
Paul Eggert <=