Mir

Comment 11 for bug 1201246

Revision history for this message
In , Paolo-carlini (paolo-carlini) wrote :

I'm making some progress understanding these parts of the front-end.

For example the following trivial patchlet passes the testcase ;) But, seriously, I'm not sure whether we really need a full fledged build_exception_variant, whether we have to do something about LAZY_* things, and much, much, more.

Index: class.c
===================================================================
--- class.c (revision 185722)
+++ class.c (working copy)
@@ -1001,6 +1001,10 @@ add_method (tree type, tree method, tree using_dec
                   "destructor",
                   type);
        }
+ else if (cxx_dialect >= cxx0x
+ && !TYPE_RAISES_EXCEPTIONS (TREE_TYPE (method)))
+ TREE_TYPE (method) = build_exception_variant (TREE_TYPE (method),
+ noexcept_true_spec);
     }
   else
     {