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

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

https://gcc.gnu.org/g:6c69f7c449cc1c0d48e13b8680023a59f541260e

commit r10-10719-g6c69f7c449cc1c0d48e13b8680023a59f541260e
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Apr 11 13:06:05 2022 -0400

    c++: operator new lookup [PR98249]

    The standard says, as we quote in the comment just above, that if we don't
    find operator new in the allocated type, it should be looked up in the
    global scope.  This is specifically ::, not just any namespace, and we
    already give an error for an operator new declared in any other namespace.

            PR c++/98249

    gcc/cp/ChangeLog:

            * call.c (build_operator_new_call): Just look in ::.

    gcc/testsuite/ChangeLog:

            * g++.dg/lookup/new3.C: New test.

Reply via email to