aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-06-29 10:34:39 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-29 10:34:39 -0400
commitb198484e89cb986f278461a0ee2229154c6654ee (patch)
treeeddc02ef3cf46bce04652e8616df117283a29d25 /gcc/cp/method.c
parent1f2911476d723f30c53dd175589b2b561e36c439 (diff)
downloadgcc-b198484e89cb986f278461a0ee2229154c6654ee.zip
gcc-b198484e89cb986f278461a0ee2229154c6654ee.tar.gz
gcc-b198484e89cb986f278461a0ee2229154c6654ee.tar.bz2
class.c (finalize_literal_type_property): Update conditions.
* class.c (finalize_literal_type_property): Update conditions. * method.c (defaulted_late_check): Set TYPE_HAS_CONSTEXPR_CTOR. From-SVN: r175644
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 48b9c74..de43a38 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1571,10 +1571,14 @@ defaulted_late_check (tree fn)
}
TREE_TYPE (fn) = build_exception_variant (TREE_TYPE (fn), eh_spec);
if (DECL_DECLARED_CONSTEXPR_P (implicit_fn))
- /* Hmm...should we do this for out-of-class too? Should it be OK to
- add constexpr later like inline, rather than requiring
- declarations to match? */
- DECL_DECLARED_CONSTEXPR_P (fn) = true;
+ {
+ /* Hmm...should we do this for out-of-class too? Should it be OK to
+ add constexpr later like inline, rather than requiring
+ declarations to match? */
+ DECL_DECLARED_CONSTEXPR_P (fn) = true;
+ if (kind == sfk_constructor)
+ TYPE_HAS_CONSTEXPR_CTOR (ctx) = true;
+ }
}
if (!DECL_DECLARED_CONSTEXPR_P (implicit_fn)