]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-common: suppress -Wtautological-constant-out-of-range-compare
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Dec 2023 18:33:03 +0000 (10:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Dec 2023 03:22:42 +0000 (19:22 -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
m4/gnulib-common.m4

index a3a10e0258707075474198f231decbd6ff5f90be..fd92a5741ba6cb88c78cc438c4697348aaf29108 100644 (file)
--- 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.
index b3852a595ee6fa485798445df627ad414ecc91f1..72f3f090ff0b6b903b74ae1093b4b86af2459a39 100644 (file)
@@ -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