public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/113529] Incorrect result of requires-expression in case of function call ambiguity and `operator<=>`
Date: Wed, 24 Jan 2024 22:11:36 +0000	[thread overview]
Message-ID: <bug-113529-4-Q1t8N976bw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113529-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113529

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:fecb45a936d62ca24dd8b4985ea0555c28edefa8

commit r14-8402-gfecb45a936d62ca24dd8b4985ea0555c28edefa8
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Jan 24 17:11:09 2024 -0500

    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>

  parent reply	other threads:[~2024-01-24 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21  8:51 [Bug c++/113529] New: Incorrect result of requires-expression in case of function call ambiguity fchelnokov at gmail dot com
2024-01-21  9:03 ` [Bug c++/113529] Incorrect result of requires-expression in case of function call ambiguity and `operator<=>` pinskia at gcc dot gnu.org
2024-01-22 18:15 ` ppalka at gcc dot gnu.org
2024-01-24 22:11 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-26 14:42 ` cvs-commit at gcc dot gnu.org
2024-01-26 14:43 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113529-4-Q1t8N976bw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).