]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve static checking when using upcoming GCC 13.3
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 May 2024 19:24:18 +0000 (12:24 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:36:47 +0000 (15:36 +0200)
* 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
src/marker.c

index bf928f51b174d2dde588a609d87335d6e494015f..010d63e4dd9261a5d0844f6621d394c274392a06 100644 (file)
@@ -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
 
index 2abc951fc76dff271bba0f1fce3ff4bdb6aaeb0c..f016bf9c0889ce26176fbff9fe43ed3f51c32707 100644 (file)
@@ -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