re PR c++/48948 ([C++0x] constexpr friend function cannot be defined in-class)
authorJason Merrill <jason@redhat.com>
Wed, 18 May 2011 17:19:15 +0000 (13:19 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 18 May 2011 17:19:15 +0000 (13:19 -0400)
commit0515f4d2ba0a438d1a6dadb6a88b7c6e5449a129
tree610494ba7abd94cabdfb2a873151cbc9247c7d95
parent41d471d612cc2929a39553fea761e587ed3076ab
re PR c++/48948 ([C++0x] constexpr friend function cannot be defined in-class)

PR c++/48948
PR c++/49015
* class.c (finalize_literal_type_property): Do check
for constexpr member functions of non-literal class.
(finish_struct): Don't call check_deferred_constexpr_decls.
* cp-tree.h: Don't declare it.
(DECL_DEFERRED_CONSTEXPR_CHECK): Remove.
* decl.c (grok_special_member_properties): Don't check it
(grokfnedcl): Don't call validate_constexpr_fundecl.
(start_preparsed_function): Do call it.
* pt.c (tsubst_decl): Don't call it.
(instantiate_class_template_1): Don't call
check_deferred_constexpr_decls.
* semantics.c (literal_type_p): Check for any incompleteness.
(ensure_literal_type_for_constexpr_object): Likewise.
(is_valid_constexpr_fn): Revert deferral changes.
(validate_constexpr_fundecl): Likewise.
(register_constexpr_fundef): Likewise.
(check_deferred_constexpr_decls): Remove.

From-SVN: r173869
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C