http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50837

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-25 
01:10:59 UTC ---
I can't believe it's so easy: fixes the testcase and passes the testsuite
(modulo a trivial tweak to a dg-error string):

Index: cp/pt.c
===================================================================
--- cp/pt.c     (revision 180413)
+++ cp/pt.c     (working copy)
@@ -13041,7 +13041,7 @@ tsubst_copy_and_build (tree t,
        decl = finish_id_expression (t, decl, NULL_TREE,
                                     &idk,
                                     integral_constant_expression_p,
-                                   
/*allow_non_integral_constant_expression_p=*/false,
+                                   
/*allow_non_integral_constant_expression_p=*/true,
                                     &non_integral_constant_expression_p,
                                     /*template_p=*/false,
                                     /*done=*/true,

Reply via email to