* src/keyboard.c (read_char): Initialize c_volatile before
calling setjmp. Although not necessary for correctness,
and not needed for gcc 14.2.1
20240801 (Red Hat 14.2.1-1)
on x86-64 when built with --enable-gcc-warnings,
some GCC 14 x86-64 configurations issue a false positive
without this change.
Problem reported by Andrea Corallo in:
https://lists.gnu.org/r/emacs-devel/2024-08/msg00620.html
and fix suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2024-08/msg00627.html
(cherry picked from commit
4f1987cf77bc8e0f0180a665b3cab732021e25ab)
it *must not* be in effect when we call redisplay. */
specpdl_ref jmpcount = SPECPDL_INDEX ();
- Lisp_Object volatile c_volatile;
+ Lisp_Object volatile c_volatile = c;
if (sys_setjmp (local_getcjmp))
{
c = c_volatile;
goto non_reread;
}
- c_volatile = c;
#if GCC_LINT && __GNUC__ && !__clang__
/* This useless assignment pacifies GCC 14.2.1 x86-64
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161>. */