This is the mail archive of the gcc-patches@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]

Re: [C++ RFC / Patch] Implementing "Deducing "noexcept" for destructors"


Hi,
On 03/28/2012 06:40 PM, Paolo Carlini wrote:
+      /* 12.4/3  */
+      if (cxx_dialect>= cxx0x
+ && DECL_DESTRUCTOR_P (decl)
+ && TYPE_RAISES_EXCEPTIONS (TREE_TYPE (old_decl)))
+        deduce_noexcept_on_destructor (decl);

The exception specification on old_decl doesn't matter; we can drop that test.
I seem to remember something going wrong with templates otherwise, because implicitly_declare_fn has gcc_assert (!dependent_type_p (type)); I don't know if that rings a bell to you... I'll double check anyway.
Yes, If I remove that check, then we hit that gcc_assert for:

template<typename T>
struct A
{
  ~A();
};

template<typename T>
A<T>::~A() { }

Paolo.


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