diff mbox

[C++] PR 58610

Message ID 5310D555.2030107@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Feb. 28, 2014, 6:28 p.m. UTC
On 02/28/2014 04:57 PM, Jason Merrill wrote:
> OK.
Thanks. I'm going to commit as obvious the additional lambda.c hunk 
below, which removes another now redundant STRIP_TEMPLATE use.

Thanks,
Paolo.

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

	PR c++/58610
	* cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
	* call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
	* lambda.c (maybe_add_lambda_conv_op): Likewise.

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

	PR c++/58610
	* g++.dg/cpp0x/constexpr-ice11.C: New.
diff mbox

Patch

Index: cp/call.c
===================================================================
--- cp/call.c	(revision 208224)
+++ cp/call.c	(working copy)
@@ -3237,7 +3237,7 @@  print_z_candidate (location_t loc, const char *msg
     inform (cloc, "%s%T <conversion>", msg, candidate->fn);
   else if (candidate->viable == -1)
     inform (cloc, "%s%#D <near match>", msg, candidate->fn);
-  else if (DECL_DELETED_FN (STRIP_TEMPLATE (candidate->fn)))
+  else if (DECL_DELETED_FN (candidate->fn))
     inform (cloc, "%s%#D <deleted>", msg, candidate->fn);
   else
     inform (cloc, "%s%#D", msg, candidate->fn);
Index: cp/cp-tree.h
===================================================================
--- cp/cp-tree.h	(revision 208224)
+++ cp/cp-tree.h	(working copy)
@@ -3222,7 +3222,7 @@  more_aggr_init_expr_args_p (const aggr_init_expr_a
 
 /* Nonzero if DECL was declared with '= delete'.  */
 #define DECL_DELETED_FN(DECL) \
-  (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (DECL))->u.base.threadprivate_or_deleted_p)
+  (LANG_DECL_FN_CHECK (DECL)->min.base.threadprivate_or_deleted_p)
 
 /* Nonzero if DECL was declared with '= default' (maybe implicitly).  */
 #define DECL_DEFAULTED_FN(DECL) \
Index: cp/lambda.c
===================================================================
--- cp/lambda.c	(revision 208224)
+++ cp/lambda.c	(working copy)
@@ -975,7 +975,7 @@  maybe_add_lambda_conv_op (tree type)
      the conversion op is used.  */
   if (varargs_function_p (callop))
     {
-      DECL_DELETED_FN (STRIP_TEMPLATE (fn)) = 1;
+      DECL_DELETED_FN (fn) = 1;
       return;
     }
 
Index: testsuite/g++.dg/cpp0x/constexpr-ice11.C
===================================================================
--- testsuite/g++.dg/cpp0x/constexpr-ice11.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/constexpr-ice11.C	(working copy)
@@ -0,0 +1,9 @@ 
+// PR c++/58610
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+  template<typename> A();
+};
+
+constexpr A a;  // { dg-error "literal|matching" }