On 03/28/2012 11:02 AM, Paolo Carlini wrote:
+&&  !comp_except_specs (new_exceptions, old_exceptions, ce_normal)
+      /* Special case in C++11: noexcept has been deduced as true for
+        the declaration and there is no exception-specification on the
+        definition.  */
+&&  !(DECL_DESTRUCTOR_P (new_decl)
+       &&  cxx_dialect>= cxx0x
+       &&  !new_exceptions&&  TYPE_NOEXCEPT_P (old_type)))

TYPE_NOEXCEPT_P is the wrong test; the implicit declaration might have an exception-specification that allows some or all exceptions. I think the most straightforward thing would be to add the implicit exception-specification immediately when declaring a destructor outside the class, so that by the time we get to check_redeclaration_exception_specification the EH specs will match.

Jason

Reply via email to