[Bug middle-end/54561] incorrect setjmp -Wclobber diagnostics

eggert at gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 12 23:39:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54561

--- Comment #2 from eggert at gnu dot org 2012-09-12 23:39:16 UTC ---
> GCC ... warns if it is alive across on either branch on setjmp.

OK, thanks, that's the bug then.  GCC should warn only about the
longjmp branch, not about the non-lonjmp branch.

Can GCC model the longjmp branch as assigning garbage to all the
nonvolatile locals, and then use the algorithm it's already using
when it warns about use of uninitialized locals?  Something like
that should do the trick.



More information about the Gcc-bugs mailing list