diff mbox

[C++] PR 60253

Message ID 5307352F.1070904@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Feb. 21, 2014, 11:14 a.m. UTC
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).

Tested x86_64-linux.

Thanks,
Paolo.

/////////////////////////
/cp
2014-02-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60253
	* call.c (convert_arg_to_ellipsis): Return error_mark_node after
	error_at.

/testsuite
2014-02-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60253
	* g++.dg/overload/ellipsis2.C: New.

Comments

Paolo Carlini Feb. 27, 2014, 4:26 p.m. UTC | #1
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.
Jason Merrill Feb. 27, 2014, 6:19 p.m. UTC | #2
OK.

Jason
diff mbox

Patch

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" }