bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] diffseq: port to GCC 14.2.1 in ‘patch’


From: Paul Eggert
Subject: [PATCH] diffseq: port to GCC 14.2.1 in ‘patch’
Date: Fri, 23 Aug 2024 13:51:15 -0700

* lib/diffseq.h: Also suppress -Wanalyzer-use-of-uninitialized-value.
This fixes an unwanted diagnostic when compiling GNU ‘patch’
with gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1) x86-64.
---
 ChangeLog     | 7 +++++++
 lib/diffseq.h | 8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e0e0c013a..00db30f078 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diffseq: port to GCC 14.2.1 in ‘patch’
+       * lib/diffseq.h: Also suppress -Wanalyzer-use-of-uninitialized-value.
+       This fixes an unwanted diagnostic when compiling GNU ‘patch’
+       with gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1) x86-64.
+
 2024-08-23  Bruno Haible  <bruno@clisp.org>
 
        host-cpu-c-abi: Update comment, working around FreeBSD breakage.
diff --git a/lib/diffseq.h b/lib/diffseq.h
index 0c5bc9cbc6..362df177af 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -93,10 +93,14 @@
 #endif
 
 /* Suppress gcc's "...may be used before initialized" warnings,
-   generated by GCC versions up to at least GCC 13.2.  */
-#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
+   generated by GCC versions up to at least GCC 14.2.
+   Likewise for gcc -fanalyzer's "use of uninitialized value" warnings.  */
+#if 4 <= __GNUC__ + (7 <= __GNUC_MINOR__)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+# if 13 <= __GNUC__
+#  pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
+# endif
 #endif
 
 /*
-- 
2.46.0




reply via email to

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