[Bug c++/90711] [9/10 Regression] Failing SFINAE from unrelated struct since r9-6794

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 31 17:04:46 GMT 2020


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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:0e66150084aa217811a5c45fb15e98d7ed3e8839

commit r9-8427-g0e66150084aa217811a5c45fb15e98d7ed3e8839
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Mar 30 16:09:43 2020 -0400

    c++: Fix comparison of fn() and ns::fn() [PR90711]

    The resolution of CWG issue 1321 clarified that when deciding whether two
    expressions involving template parameters are equivalent, two dependent
    function calls where the function is named with an unqualified-id are
    considered to be equivalent if the name is the same, even if unqualified
    lookup finds different sets of functions.  We were wrongly treating
    qualified-ids the same way, so that EXISTS and test::EXISTS were considered
    to be equivalent even though they are looking up the name in different
    scopes.  This also causes a mangling bug, but I don't think it's safe to
fix
    that for GCC 10; this patch just fixes the comparison.

    gcc/cp/ChangeLog
    2020-03-30  Jason Merrill  <jason@redhat.com>

            PR c++/90711
            * tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P.
            (called_fns_equal): Check DECL_CONTEXT.


More information about the Gcc-bugs mailing list