[Bug c++/99135] New: [modules] implementation partitions are too visible

nathan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 17 14:53:45 GMT 2021


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

            Bug ID: 99135
           Summary: [modules] implementation partitions are too visible
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

imported implementation partitions are exported :(

// p_a.ii
module Foo:A;
void frob ();

// p_b.ii
export module Foo;
import :A;

// p_c.ii
module Foo;
void f () { frob (); }

zathras:113>./cc1plus -fmodules-ts -quiet p_a.ii
zathras:114>./cc1plus -fmodules-ts -quiet p_b.ii
zathras:115>./cc1plus -fmodules-ts -quiet p_c.ii
zathras:116>

the p_c implementation unit should not see the decls of implementation
partition Foo:A.  It needs to explicitly import :A to do that.


More information about the Gcc-bugs mailing list