https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120323
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=99000 CC| |nshead at gcc dot gnu.org Blocks| |103524 Status|UNCONFIRMED |RESOLVED --- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> --- Thanks for the report! This is a known issue in GCC's module implementation, see https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Modules.html: Textual merging of reachable GM entities Entities may be multiply defined across different header-units. These must be de-duplicated, and this is implemented across imports, or when an import redefines a textually-defined entity. However the reverse is not implemented—textually redefining an entity that has been defined in an imported header-unit. A redefinition error is emitted. --- In general, for now try to ensure that all #includes come before any imports that may declare the same entities; this will be particularly relevant for standard library headers of course. *** This bug has been marked as a duplicate of bug 99000 *** Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 [Bug 103524] [meta-bug] modules issue