aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2025-08-07 15:43:22 -0400
committerPatrick Palka <ppalka@redhat.com>2025-08-07 15:43:22 -0400
commit932b764be40bc675a65b89111bd28f31e99fcdbd (patch)
tree442122ea1bc7711a64b26c631f3df892d5291745 /libjava/java
parentb163ea73dcd06657e29d881f53bc8a95bc2658c5 (diff)
downloadgcc-932b764be40bc675a65b89111bd28f31e99fcdbd.zip
gcc-932b764be40bc675a65b89111bd28f31e99fcdbd.tar.gz
gcc-932b764be40bc675a65b89111bd28f31e99fcdbd.tar.bz2
c++: extract_call_expr and C++20 rewritten ops
After r16-2519-gba5a6787374dea, we'll never express a C++20 rewritten comparison operator as a built-in operator acting on an operator<=> call, e.g. operator<=>(x, y) @ 0. This is because operator<=> always returns a class type (std::foo_ordering), so the outer operator@ will necessarily resolve to a non-built-in operator@ for that class type (even in the non-dependent templated case, after that commit). So the corresponding handling in extract_call_expr is basically dead code, except for the TRUTH_NOT_EXPR case where we can plausibly still have !(operator==(x, y)), but it doesn't make sense to recognize just that one special case of operator rewriting. So let's just remove it altogether; apparently it's no longer needed. Also, the handling is imprecise: it recognizes expressions such as 0 < f() which never corresponded to a call in the first place. All the more reason to remove it. gcc/cp/ChangeLog: * call.cc (extract_call_expr): Remove handling of C++20 rewritten comparison operators. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions