This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66451] Array not fully destructed if element destructor throws exception


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-08
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Dodd from comment #0)
> If an array element throws during destruction, undestructed elements in that
> array are not destructed. Other local variables are destructed. Clang calls
> destructors on all automatic objects, regardless whether in or out of an
> array.

Not always ;-)  https://llvm.org/bugs/show_bug.cgi?id=22877

This is probably related to PR66139


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]