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

Moritz Sichert <sichert at in dot tum.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sichert at in dot tum.de

--- Comment #6 from Moritz Sichert <sichert at in dot tum.de> ---
We are also running into this bug when using RAII lock guards and goto to
"retry" the section guarded by the lock.

I think the standard is very clear that the destructor should be called:

"Transfer out of a loop, out of a block, or back past an initialized variable
with automatic storage duration involves the destruction of objects with
automatic storage duration that are in scope at the point transferred from but
not at the point transferred to."

N4861: Section 8.7 (2)

Reply via email to