summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2024-05-09 12:24:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2024-05-09 12:24:53 -0700
commitfd333fd214f8e0740a4ec51705a32ed6cca93c57 (patch)
tree06c63ac9ff46349d9a13c018a4f3463e5d617d5e /src
parente8ac15500424ebf40739422f40d966dc067f42df (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h2
-rw-r--r--src/marker.c2
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 <https://www.gnu.org/licenses/>. */
#include <config.h>
/* Work around GCC bug 113253. */
-#if __GNUC__ == 13
+#if __GNUC__ == 13 && __GNUC_MINOR__ < 3
# pragma GCC diagnostic ignored "-Wanalyzer-deref-before-check"
#endif