diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-29 10:34:39 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-29 10:34:39 -0400 |
commit | b198484e89cb986f278461a0ee2229154c6654ee (patch) | |
tree | eddc02ef3cf46bce04652e8616df117283a29d25 /gcc/cp/method.c | |
parent | 1f2911476d723f30c53dd175589b2b561e36c439 (diff) | |
download | gcc-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.c | 12 |
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) |