]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around GCC bug 109577
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 01:51:22 +0000 (18:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 02:28:11 +0000 (19:28 -0700)
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA):
Ignore -Wanalyzer-allocation-size, as it generates many
false alarms in GCC 13.

src/lisp.h

index 72d2c1a8f91ec5a7a6af846d224f645bdeb9e320..8f7d44bfb0d31638ef5cea25fa877770aa8882e7 100644 (file)
@@ -5399,6 +5399,14 @@ safe_free_unbind_to (specpdl_ref count, specpdl_ref sa_count, Lisp_Object val)
   return unbind_to (count, val);
 }
 
+/* Work around GCC bug 109577
+   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)
+# pragma GCC diagnostic ignored "-Wanalyzer-allocation-size"
+#endif
+
 /* Set BUF to point to an allocated array of NELT Lisp_Objects,
    immediately followed by EXTRA spare bytes.  */