https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107291
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:67ac78caf31f7cb3202177e6428a46d829b70f23 commit r13-8285-g67ac78caf31f7cb3202177e6428a46d829b70f23 Author: Jason Merrill <ja...@redhat.com> Date: Mon Feb 5 19:56:45 2024 -0500 c++: defaulted op== for incomplete class [PR107291] After complaining about lack of friendship, we should not try to go on and define the defaulted comparison operator anyway. PR c++/107291 gcc/cp/ChangeLog: * method.cc (early_check_defaulted_comparison): Fail if not friend. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/spaceship-eq17.C: New test. (cherry picked from commit c5d34912ad576be1ef19be92f7eabde54b9089eb)