summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-05-14 18:51:23 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-05-14 19:28:12 -0700
commit4fedd5af4cc53666277fbcfc3417c0d7e3201c1d (patch)
tree9121989cec9a47a530826106f0c8e8a94de3667e
parent9eef5a678c3bb6a6248193524e67f7003f25f5af (diff)
downloademacs-4fedd5af4cc53666277fbcfc3417c0d7e3201c1d.tar.gz
Work around GCC bug 109847 in buffer.c
* src/buffer.c: Ignore GCC 13+ -Wanalyzer-out-of-bounds.
-rw-r--r--src/buffer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 399460c47da..7951b7ac322 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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