C++ PATCH for c++/41449 (EH cleanup of partially-aggregate-initialized objects)
Jason Merrill
jason@redhat.com
Thu Oct 20 20:24:00 GMT 2011
The C++ standard says that if an exception is thrown during
initialization of a class, any fully-constructed subobjects are
destroyed. We already handled that properly for objects initialized via
constructor, but we weren't handling it properly for aggregate
initialization. This patch adds the necessary EH cleanups for during
initialization; conveniently, just using push_eh_cleanup works here
because we were already doing push/pop_stmt_list around the
initialization as a whole.
Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 41449.patch
Type: text/x-patch
Size: 1439 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111020/2362efe6/attachment.bin>
More information about the Gcc-patches
mailing list