From 6fe5834228ff6fde334f4618f57f70138dda12c2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 29 Dec 2023 10:33:03 -0800 Subject: [PATCH] gnulib-common: suppress -Wtautological-constant-out-of-range-compare MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 + + 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 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.39.5