On 03/26/2012 09:31 PM, Jason Merrill wrote:
On 03/26/2012 07:22 AM, Paolo Carlini wrote:
My basic idea so far is very simple:
--- class.c (revision 185792)
+++ class.c (working copy)
@@ -1001,6 +1001,10 @@ add_method (tree type, tree method, tree
+ else if (cxx_dialect >= cxx0x
+ && !TYPE_RAISES_EXCEPTIONS (TREE_TYPE (method)))
+ TREE_TYPE (method) = build_exception_variant (TREE_TYPE (method),
That would implement N1366, but implementing N3204 is a bit more
involved. You need to copy TYPE_RAISES_EXCEPTIONS from the result of
implicitly_declare_fn; see defaulted_late_check for something similar.
Also, this is too early, since we can't know what the eh specification
of the implicit declaration would be until the closing brace of the class.
Thanks for the help Jason.