From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BCF6E3882647; Thu, 13 Jun 2024 15:06:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCF6E3882647 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718291198; bh=/l8ALY4ZTiZPoIOHnUZbBQW4oeezA5BmYwq7bN4CM90=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jNT5jZVxEOTTupQKdnpn8cqz4u/7gAbW3q9riK+UrBMoQA01CdSft/eLA6y+5WSxQ Xp43fmOumRWEv8Wvy2skVt1Rbndzc7fnCPDAaWLd0SGXdD9vBQp6TUFb/ZYySz7cN1 rcIllzrHTKLZwyT1Csn7tR0XMIN32ROf2TvSFy9Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114683] [modules] name declared in GMF in inline namespace and exported via using-decl from parent namespace is not visible to importer Date: Thu, 13 Jun 2024 15:06:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114683 --- Comment #2 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:609764a42f0cd3f6358562cab98fc220d3d2d9fd commit r15-1297-g609764a42f0cd3f6358562cab98fc220d3d2d9fd Author: Jason Merrill Date: Wed Jun 12 18:24:35 2024 -0400 c++/modules: export using across namespace [PR114683] Currently we represent a non-function using-declaration by inserting the named declaration into the target scope. In general this works fine, b= ut in the case of an exported using-declaration we have nowhere to mark the using-declaration as exported, so we mark the original declaration as exported instead, and then treat all using-declarations that name it as exported as well. We were doing this only if there was also a previous non-exported using, so for this testcase the export got lost; this patch broadens the workaround to also apply to the using that first brings the declaration into the current scope. This does not fully resolve 114683, but replaces a missing exports bug = with an extra exports bug, which should be a significant usability improveme= nt. The testcase has xfails for extra exports. I imagine a complete fix should involve inserting a USING_DECL. PR c++/114683 gcc/cp/ChangeLog: * name-lookup.cc (do_nonmember_using_decl): Allow exporting a newly inserted decl. gcc/testsuite/ChangeLog: * g++.dg/modules/using-22_a.C: New test. * g++.dg/modules/using-22_b.C: New test.=