From: Paul Eggert Date: Fri, 23 Aug 2024 20:50:32 +0000 (-0700) Subject: diffseq: port to GCC 14.2.1 in ‘patch’ X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9e750e70e63016d731161aef19692889cac05da5;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 042d29a82f..df74aab4cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-08-23 Paul Eggert + + 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-21 Paul Eggert mcel: port to uClibc-ng 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 /*