https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33799
mm-nospam at outlook dot co.nz changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mm-nospam at outlook dot co.nz
--- Comment #14 from mm-nospam at outlook dot co.nz ---
The bug still occurs for the same test case with the f() function modified as
such:
X f()
{
try {
X x(true);
return X(false);
} catch(...) { }
return X(false);
}
The first X(false) is constructed and never destructed.
This example also occurs in [except.ctor]/2 of the C++17 standard, note that
since C++17 X's destructor should be marked as noexcept(false) in the test
case.