mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 19:01:17 +08:00
re PR c++/58610 ([c++11] ICE with constexpr of class with template constructor)
/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. From-SVN: r208226
This commit is contained in:
parent
c5b001b5f0
commit
f1ee5eaf07
@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
||||
2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/60253
|
||||
|
@ -3237,7 +3237,7 @@ print_z_candidate (location_t loc, const char *msgstr,
|
||||
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);
|
||||
|
@ -3222,7 +3222,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
|
||||
|
||||
/* 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) \
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/58610
|
||||
* g++.dg/cpp0x/constexpr-ice11.C: New.
|
||||
|
||||
2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/60314
|
||||
|
9
gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C
Normal file
9
gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C
Normal file
@ -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" }
|
Loading…
x
Reference in New Issue
Block a user