]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: using builtin
authorJason Merrill <jason@redhat.com>
Fri, 14 Nov 2025 17:59:38 +0000 (23:29 +0530)
committerJason Merrill <jason@redhat.com>
Sat, 15 Nov 2025 06:11:56 +0000 (11:41 +0530)
commitfeccb9c9cd6ccab3fa75e2ca3f533e02de15750f
tree2c2daf15b10b8a2b3454b243324be55e3cb0b0fe
parent2359344af53a5fc844d108fcf9f0e8bddd84a6b5
c++/modules: using builtin

Here, when we try to bring "memset" back into the global namespace, we find
the built-in, see that it's the same declaration (because the module brought
it into the other namespace with a using-declaration), and decide that we
don't need to do anything.  But we still need a non-hidden overload.

gcc/cp/ChangeLog:

* name-lookup.cc (do_nonmember_using_decl): Handle hidden better.

gcc/testsuite/ChangeLog:

* g++.dg/modules/using-33_a.C: New test.
* g++.dg/modules/using-33_b.C: New test.
gcc/cp/name-lookup.cc
gcc/testsuite/g++.dg/modules/using-33_a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/using-33_b.C [new file with mode: 0644]