aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-31 22:04:48 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-31 22:04:48 -0400
commit0930cc0ece835ab77a30d8b5894a8910f55d4054 (patch)
treef8e8b942d2e97fd64107a2ee74fb2dc1596e8511 /gcc/cp/method.c
parentec52b1115dda4b0e38aa5620b0c3914b69008a24 (diff)
downloadgcc-0930cc0ece835ab77a30d8b5894a8910f55d4054.zip
gcc-0930cc0ece835ab77a30d8b5894a8910f55d4054.tar.gz
gcc-0930cc0ece835ab77a30d8b5894a8910f55d4054.tar.bz2
class.c (is_really_empty_class): Work when type is not complete.
* class.c (is_really_empty_class): Work when type is not complete. (synthesized_default_constructor_is_constexpr): New. (add_implicitly_declared_members): Use it. (type_has_constexpr_default_constructor): Likewise. * cp-tree.h: Declare it. * method.c (synthesized_method_walk): Use it. From-SVN: r166124
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 6687c75..ca5964e 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1157,7 +1157,11 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
methods in C++0x. */
if (expected_trivial
&& (!copy_arg_p || cxx_dialect < cxx0x))
- return;
+ {
+ if (constexpr_p && sfk == sfk_constructor)
+ *constexpr_p = synthesized_default_constructor_is_constexpr (ctype);
+ return;
+ }
#endif
++cp_unevaluated_operand;