From 3dd83cfcbf4b7be34344afdc3c2c641c15ce6520 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 9 May 2024 12:24:18 -0700 Subject: [PATCH] Improve static checking when using upcoming GCC 13.3 * src/lisp.h: In GCC 13.3 and later, do not ignore -Wanalyzer-allocation-size. * src/marker.c: In GCC 13.3 and later, do not ignore -Wanalyzer-deref-before-check. (cherry picked from commit fd333fd214f8e0740a4ec51705a32ed6cca93c57) --- src/lisp.h | 2 +- src/marker.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index bf928f51b17..010d63e4dd9 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -5701,7 +5701,7 @@ safe_free_unbind_to (specpdl_ref count, specpdl_ref sa_count, Lisp_Object val) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109577 which causes GCC to mistakenly complain about the memory allocation in SAFE_ALLOCA_LISP_EXTRA. */ -#if GNUC_PREREQ (13, 0, 0) && !GNUC_PREREQ (14, 0, 0) +#if __GNUC__ == 13 && __GNUC_MINOR__ < 3 # pragma GCC diagnostic ignored "-Wanalyzer-allocation-size" #endif diff --git a/src/marker.c b/src/marker.c index 2abc951fc76..f016bf9c088 100644 --- a/src/marker.c +++ b/src/marker.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . */ #include /* Work around GCC bug 113253. */ -#if __GNUC__ == 13 +#if __GNUC__ == 13 && __GNUC_MINOR__ < 3 # pragma GCC diagnostic ignored "-Wanalyzer-deref-before-check" #endif -- 2.39.5