Message ID | 5307352F.1070904@oracle.com |
---|---|
State | New |
Headers | show |
On 02/21/2014 12:14 PM, Paolo Carlini wrote: > Hi, > > unless we have reasons to believe that the diagnostic quality could > regress in some circumstances, we can easily resolve this ICE on > invalid regression by always returning error_mark_node after error > (thus outside SFINAE too). Pinging this patchlet... Thanks! Paolo.
OK. Jason
Index: cp/call.c =================================================================== --- cp/call.c (revision 207987) +++ cp/call.c (working copy) @@ -6406,8 +6406,7 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t if (complain & tf_error) error_at (loc, "cannot pass objects of non-trivially-copyable " "type %q#T through %<...%>", arg_type); - else - return error_mark_node; + return error_mark_node; } } Index: testsuite/g++.dg/overload/ellipsis2.C =================================================================== --- testsuite/g++.dg/overload/ellipsis2.C (revision 0) +++ testsuite/g++.dg/overload/ellipsis2.C (working copy) @@ -0,0 +1,13 @@ +// PR c++/60253 + +struct A +{ + ~A(); +}; + +struct B +{ + B(...); +}; + +B b(0, A()); // { dg-error "cannot pass" }