c++: Redeclaration of implicit operator== [PR94583]
authorJason Merrill <jason@redhat.com>
Tue, 28 Apr 2020 16:27:27 +0000 (12:27 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 28 Apr 2020 18:37:36 +0000 (14:37 -0400)
commitbce54ed494fd0e61f41986e2bdbcfb2d2a3a1cf1
tree6f38b1eb92da669605d2d65982ae70939c525b64
parent5eae0ac76dcb6aac1d1d6c4edd8852e0035792e4
c++: Redeclaration of implicit operator== [PR94583]

My last patch rejected a namespace-scope declaration of the
implicitly-declared friend operator== before the class, but redeclaring it
after the class should be OK.

gcc/cp/ChangeLog
2020-04-28  Jason Merrill  <jason@redhat.com>

PR c++/94583
* decl.c (use_eh_spec_block): Check nothrow type after
DECL_DEFAULTED_FN.
* pt.c (maybe_instantiate_noexcept): Call synthesize_method for
DECL_MAYBE_DELETED fns here.
* decl2.c (mark_used): Not here.
* method.c (get_defaulted_eh_spec): Reject DECL_MAYBE_DELETED here.
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/method.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C [new file with mode: 0644]