diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-01-24 17:11:09 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-01-24 17:11:09 -0500 |
commit | fecb45a936d62ca24dd8b4985ea0555c28edefa8 (patch) | |
tree | 40da68bc4f38b0388d263487062edd69f55f9524 /gcc/cp/module.cc | |
parent | aedfdd340cbb4a97a8f6d432720a4df374c1e467 (diff) | |
download | gcc-fecb45a936d62ca24dd8b4985ea0555c28edefa8.zip gcc-fecb45a936d62ca24dd8b4985ea0555c28edefa8.tar.gz gcc-fecb45a936d62ca24dd8b4985ea0555c28edefa8.tar.bz2 |
c++: ambiguous member lookup for rewritten cands [PR113529]
Here we handle the operator expression u < v inconsistently: in a SFINAE
context we accept it, and in a non-SFINAE context we reject it with
error: request for member 'operator<=>' is ambiguous
as per [class.member.lookup]/6. This inconsistency is ultimately
because we neglect to propagate error_mark_node after recursing in
add_operator_candidates, fixed like so.
PR c++/113529
gcc/cp/ChangeLog:
* call.cc (add_operator_candidates): Propagate error_mark_node
result after recursing to find rewritten candidates.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/spaceship-sfinae3.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/cp/module.cc')
0 files changed, 0 insertions, 0 deletions