diff options
author | Jason Merrill <jason@redhat.com> | 2010-12-08 15:00:27 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-12-08 15:00:27 -0500 |
commit | f4842525074ad8c1d7365ea5ea51a2d5b023293b (patch) | |
tree | b8d2efe090c574eab51fe46bc1d6c241774c781d /gcc/cp/method.c | |
parent | 6a68a5c39771f9dbcea080430cc0161a2ab1d3a1 (diff) | |
download | gcc-f4842525074ad8c1d7365ea5ea51a2d5b023293b.zip gcc-f4842525074ad8c1d7365ea5ea51a2d5b023293b.tar.gz gcc-f4842525074ad8c1d7365ea5ea51a2d5b023293b.tar.bz2 |
re PR c++/46736 ([c++0x] move constructor is not implicitly deleted when it should be)
PR c++/46736
* decl.c (cp_finish_decl): Complain about an implicitly deleted
method defaulted outside the class.
* method.c (maybe_explain_implicit_delete): Don't check DECL_INITIAL.
From-SVN: r167601
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index ed75a64..dc72355 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1318,8 +1318,7 @@ maybe_explain_implicit_delete (tree decl) /* If decl is a clone, get the primary variant. */ decl = DECL_ORIGIN (decl); gcc_assert (DECL_DELETED_FN (decl)); - if (DECL_DEFAULTED_FN (decl) - && DECL_INITIAL (decl) == NULL_TREE) + if (DECL_DEFAULTED_FN (decl)) { /* Not marked GTY; it doesn't need to be GC'd or written to PCH. */ static htab_t explained_htab; |