public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context
[not found] <bug-78446-4@http.gcc.gnu.org/bugzilla/>
@ 2020-05-09 16:46 ` ppalka at gcc dot gnu.org
2020-05-14 17:03 ` cvs-commit at gcc dot gnu.org
2020-05-14 17:03 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-09 16:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78446
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Target Milestone|--- |11.0
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
CC| |ppalka at gcc dot gnu.org
Last reconfirmed| |2020-05-09
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed. Not a regression -- this never worked properly. I have a patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context
[not found] <bug-78446-4@http.gcc.gnu.org/bugzilla/>
2020-05-09 16:46 ` [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context ppalka at gcc dot gnu.org
@ 2020-05-14 17:03 ` cvs-commit at gcc dot gnu.org
2020-05-14 17:03 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-14 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78446
--- Comment #2 from CVS 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:098cf31aa2631db6922d4de5661c1b0ce19af0aa
commit r11-399-g098cf31aa2631db6922d4de5661c1b0ce19af0aa
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu May 14 12:56:18 2020 -0400
c++: Missing SFINAE with lookup_fnfields [PR78446]
Here we're failing to do SFINAE in build_op_call when looking up the
class's operator() via lookup_fnfields, which calls lookup_member always
with complain=tf_warning_or_error; from there we would complain
about an ambiguous lookup for operator().
This patch fixes this by adding a tsubst_flags_t parameter to
lookup_fnfields and adjusting all its callers appropriately.
gcc/cp/ChangeLog:
PR c++/78446
* call.c (build_op_call): Pass complain to lookup_fnfields.
(build_special_member_call): Likewise.
* class.c (type_requires_array_cookie): Pass tf_warning_or_error
to lookup_fnfields.
* cp-tree.h (lookup_fnfields): Add tsubst_flags_t parameter.
* except.c (build_throw): Pass tf_warning_or_error to
lookup_fnfields.
* init.c (build_new_1): Pass complain to lookup_fnfields.
* method.c (locate_fn_flags): Likewise.
* name-lookup.c (lookup_name_real_1): Pass tf_warning_or_error
to lookup_fnfields.
* pt.c (tsubst_baselink): Pass complain to lookup_fnfields.
* search.c (lookup_fnfields): New 'complain' parameter. Pass it
to lookup_member.
gcc/testsuite/ChangeLog:
PR c++/78446
* g++.dg/template/sfinae31.C: New test.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context
[not found] <bug-78446-4@http.gcc.gnu.org/bugzilla/>
2020-05-09 16:46 ` [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context ppalka at gcc dot gnu.org
2020-05-14 17:03 ` cvs-commit at gcc dot gnu.org
@ 2020-05-14 17:03 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-14 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78446
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 11.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-14 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-78446-4@http.gcc.gnu.org/bugzilla/>
2020-05-09 16:46 ` [Bug c++/78446] Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context ppalka at gcc dot gnu.org
2020-05-14 17:03 ` cvs-commit at gcc dot gnu.org
2020-05-14 17:03 ` ppalka at gcc dot gnu.org
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).