From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9EE3C3858D33; Thu, 4 Jan 2024 05:03:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EE3C3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704344591; bh=Nb0GBu81JfamNiWi5FnmJVDZe/fD64b+wdhzCm80vVQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sFAOP+u8mW/zkKjANaILDnFoRDZyxI7GY0BI0PyZRvewVHanp2PO9ksoujBLzQm4F GvsSs/MxVfGFqfxdUOoHJUmLJ0MZq2pGz57H7gH5naePz91fZfv9iARgUrBbCupjQl Fpajxt8tJ/EkbzJ9rdYzRmlcLeAujRk8s35LqLXM= From: "nathanieloshead at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104221] member functions defined in separate files of classes declared in module partitions won't compile Date: Thu, 04 Jan 2024 05:03:10 +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: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: nathanieloshead at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D104221 Nathaniel Shead changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nathanieloshead at gmail d= ot com --- Comment #1 from Nathaniel Shead --- I think this is IFNDR; you cannot have more than one partition with the same name. See https://eel.is/c++draft/module.unit#3: > A module partition is a module unit whose module-declaration contains > a module-partition. A named module shall not contain multiple module > partitions with the same module-partition. All module partitions of a > module that are module interface units shall be directly or indirectly > exported by the primary module interface unit ([module.import]). > No diagnostic is required for a violation of these rules. And in particular, unlike a module implementation unit, a module partition = does not implicitly import anything; see https://eel.is/c++draft/module.unit#8 w= hich says: > A module-declaration that contains neither an export-keyword nor a > module-partition implicitly imports the primary module interface unit > of the module as if by a module-import-declaration. So this is working as specified. I don't think there'd be any good way of improving the diagnostics for this either.=