C++ Logo

sg15

Advanced search

Re: Provide build systems with ways to build the std(.compat) modules

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Tue, 11 Jul 2023 14:44:31 -0400
On Tue, Jul 11, 2023 at 11:10:33 -0400, Tom Honermann wrote:
> On 7/11/23 10:23 AM, Ben Boeckel wrote:
> > My probing question is: how to satisfy the ODR for the module
> > initialization function called on `import`?
>
> What module initialization function? The standard doesn't specify one.

Hmm. I can't find the wording that I remember, but it's about the rule
that (maybe removed?) imported modules' statics are initialized before
the importing module's globals. This is implemented via a function call
inserted into the importer's initializer:

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

--Ben

Received on 2023-07-11 18:44:34