On Wed, Sep 11, 2024 at 10:16:18PM +1000, Nathaniel Shead wrote: > In the header_module_p case, it is valid to have internal linkage > definitions (e.g. in an anonymous namespace), but in that case the > {static,tls}_aggregates lists should still be in place to be streamed > and everything should work as "normal".
As the patch doesn't touch the streaming of {static,tls}_aggregates in that case, I guess that means CWG 2867 will not be fixed for those cases (i.e. temporaries from the structured binding base initialization will be destructed at the end of that initialization, rather than at the end of subsequent get initializers); perhaps we should stream the STATIC_INIT_DECOMP_*BASE_P flags say by streaming there integer_zero_node or integer_one_node right before the decls and on streaming it back set the flags again. For the !header_module_p case, we'll need a testcase too to make sure it works properly. Jakub