https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122835
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Andrew Pinski from comment #4) > I thought this was documented not to work. It is similar to a computed goto. I think you are referring to [1]: --q-- Unlike a normal goto, in GNU C++ a computed goto will not call destructors for objects that go out of scope. --/q-- introduced by the fix for PR37722: PR37722 complains that a computed goto doesn't destroy objects that go out of scope. In the PR we agreed that it never will, but we can warn about it. [1] https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
