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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <[email protected]>:

https://gcc.gnu.org/g:9813e49e95bc4bc2f0e030a7fdd0e7ef63c056fc

commit r16-6596-g9813e49e95bc4bc2f0e030a7fdd0e7ef63c056fc
Author: Nathaniel Shead <[email protected]>
Date:   Thu Jan 8 20:38:43 2026 +1100

    c++/modules: Mark implicit using-directive for imported unnamed namespace
as imported [PR123393]

    The assertion failure in the PR is due to the implicit using-directive
    for the anonymous namespace not being considered imported, because
    make_namespace_finish calls add_using_namespace without propagating
    'from_import'.

            PR c++/123393

    gcc/cp/ChangeLog:

            * name-lookup.cc (make_namespace_finish): Pass from_import to
            add_using_namespace.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/namespace-18_a.C: New test.
            * g++.dg/modules/namespace-18_b.C: New test.

    Signed-off-by: Nathaniel Shead <[email protected]>

Reply via email to