]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around GCC bug 109847 in buffer.c
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 01:51:23 +0000 (18:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 02:28:12 +0000 (19:28 -0700)
* src/buffer.c: Ignore GCC 13+ -Wanalyzer-out-of-bounds.

src/buffer.c

index 399460c47da60cf0b8a59ff7903242e04c62524a..7951b7ac3222b57f3a4956558d08001c4db5b223 100644 (file)
@@ -50,6 +50,14 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #include "w32heap.h"           /* for mmap_* */
 #endif
 
+/* Work around GCC bug 109847
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109847
+   which causes GCC to mistakenly complain about
+   AUTO_STRING with "*scratch*".  */
+#if GNUC_PREREQ (13, 0, 0)
+# pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
+#endif
+
 /* This structure holds the default values of the buffer-local variables
    defined with DEFVAR_PER_BUFFER, that have special slots in each buffer.
    The default value occupies the same slot in this structure