]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: op== defaulted outside class [PR110084]
authorJason Merrill <jason@redhat.com>
Fri, 2 Feb 2024 17:04:11 +0000 (12:04 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 2 Feb 2024 18:54:21 +0000 (13:54 -0500)
commite17a122d417fc0d606bcb3a3705b93ee81745cab
treeabd2f42c4198fc2cfbb1c5679076057fc6932801
parent1c3cfb5a95dcc7f797ec2815690a6291878580c4
c++: op== defaulted outside class [PR110084]

defaulted_late_check is for checks that need to happen after the class is
complete; we shouldn't call it sooner.

PR c++/110084

gcc/cp/ChangeLog:

* pt.cc (tsubst_function_decl): Only check a function defaulted
outside the class if the class is complete.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/spaceship-synth-neg3.C: Check error message.
* g++.dg/cpp2a/spaceship-eq16.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp2a/spaceship-eq16.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C