https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120764
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
CC| |nshead at gcc dot gnu.org
--- Comment #1 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 ***