[Bug middle-end/91395] Report an uninitialized variable on its initialization statement (setjmp)
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 8 07:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91395
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c |middle-end
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The warning is correct due to the way sigsetjmp works.
You need to mark save_exception_stack as volatile to fix the issue.
Basically any non-volatile variable in the function scope can be incorrect.
This is what the POSIX (and C standard for setjmp) says. GCC is just taking
into account this now.
More information about the Gcc-bugs
mailing list