c++: Fix [[deprecated]] and implicit operator==. [PR97358]
authorJason Merrill <jason@redhat.com>
Thu, 15 Oct 2020 16:54:16 +0000 (12:54 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 15 Oct 2020 17:27:37 +0000 (13:27 -0400)
commitf3ee94724686b82556c07b4d33821ae973eb9aba
treec95ec49d46d3521bd44cd22bdc5bb386ea2fb5cd
parent782ebeaa681163cfd0c59f03cd850fdd52287b79
c++: Fix [[deprecated]] and implicit operator==. [PR97358]

Trying to diagnose the problem with an implicit copy function breaks if the
function isn't actually a copy function.

gcc/cp/ChangeLog:

PR c++/95844
* decl.c (copy_fn_p): Return false for a function that is neither a
constructor nor an assignment operator.
(move_signature_fn_p): Likewise.

gcc/testsuite/ChangeLog:

PR c++/95844
* g++.dg/cpp2a/spaceship-eq10.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp2a/spaceship-eq10.C [new file with mode: 0644]