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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
(In reply to jussi.pakkanen from comment #0)
> A longer version of this issue can be found in this blog post:
> 
> https://nibblestew.blogspot.com/2025/09/trying-out-import-std.html

Having read the blog post quickly, another possibly relevant clarification on
this:

> Even if this issue was fixed, it does not really help. As you could
> probably tell, this clashing will happen for all modules. So if your
> ever has two modules called utils, no matter where they are or who
> wrote them, they will both try to write gcm.cache/utils.gcm and either
> fail to build, fail on import or invoke UB.

This is already IFNDR (https://eel.is/c++draft/module.unit#2), and can cause
standard ODR-like issues as the name of the module is used as the discriminator
for module-linkage entities and the module initialiser function.  Of course
that only applies if both these modules get linked into the same executable;
the issue raised still applies if it just so happens they're both used for
separate executable targets, which I assume is what you're referring to here.

Reply via email to