https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61118

Paul Eggert <eggert at cs dot ucla.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eggert at cs dot ucla.edu

--- Comment #32 from Paul Eggert <eggert at cs dot ucla.edu> ---
Created attachment 58065
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58065&action=edit
Run "gunzip t.i.gz; gcc -O2 -S -Wclobbered t.i" to reproduce the false
positives

I ran into this bug today when compiling GNU Emacs with gcc (GCC) 14.0.1
20240411 (Red Hat 14.0.1-0) on x86-64 (Fedora 40). I didn't see it with earlier
GCC releases so I thought I'd attach a test case, derived from Emacs. Compile
with:

gunzip t.i
gcc -O2 -S -Wclobbered t.i

and the incorrect diagnostics are:

t.i: In function ‘internal_lisp_condition_case’:
t.i:7969:15: warning: variable ‘sym’ might be clobbered by ‘longjmp’ or ‘vfork’
[-Wclobbered]
 7969 |   Lisp_Object sym = XSYMBOL_WITH_POS (a)->sym;
      |               ^~~
t.i:94273:43: warning: argument ‘var’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
94273 | internal_lisp_condition_case (Lisp_Object var, Lisp_Object bodyform,
      |                               ~~~~~~~~~~~~^~~

Reply via email to