[Bug libstdc++/124268] `import std` initializer symbol is not shipped in `libstdc++`

nshead at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 19 11:29:06 GMT 2026


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

--- Comment #18 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #15)
> Another approach might be to downgrade the "exporting internal linkage
> entity" error into a pedwarn. Nathaniel, do you reckon it'd be feasible to
> gracefully handle this situation (i.e. so that the export is still usable by
> importers)?

I don't think making it usable for importers in the general case is especially
feasible, due to issues with things like lambdas and class types referencing
themselves in various ways.  But that said, I already have logic to handle at
least C variables and function declarations, see
https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wexpose-global-module-tu-local.
 I imagine it shouldn't be too hard to similarly allow `using`s of such decls,
maybe even under the same flag (it's a similar usecase/issue).


More information about the Gcc-bugs mailing list