On Thu, Aug 22, 2013 at 10:09 AM, Rafael Espíndola <
[email protected]> wrote:

> > +  } else if (D->getInstantiatedFromStaticDataMember()) {
> > +    // Initializers of static data members of class template
> specializations are
> > +    // not guaranteed to run in any order with respect to the rest of
> the
> > +    // initializers in a TU.  As a consequence, we can put them into
> their own
> > +    // llvm.global_ctors entry.  This should allow GlobalOpt to fire
> more often.
> > +    AddGlobalCtor(Fn);
> > +    DelayedCXXInitPosition.erase(D);
>
> Is there a standard section you can quote or refer to in here?
>

[basic.start.init] p2, but maybe I have it wrong here:
"Definitions of explicitly specialized class template static data members
have ordered initialization. Other class template static data members
(i.e., implicitly or explicitly instantiated specializations) have
unordered initialization."

I guess I should add a test for an explicitly specialized class template,
and not an explicitly instantiated class template.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to