This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bugs/non-portable assumptions in libstdc++


Yo Chris.

>From my understanding of the standard, I don't think that this is a legal
>optimization to make.  You are assuming that unconstructed memory starts
>out zero initialized, which is not always the case.  Granted, this is the
>case on unix and many other systems for static members, because the OS
>zeros out pages before giving them to the process.  However, I believe it
>still is making non-standard assumptions.

Order of static initialization issues are more of an issue,
portability-wise*. In general, because of this, we are moving to
returning references to static locals. See the __mt_alloc design.

For the rest, I think Paolo and Nathan have already addressed your question..

best,
-benjamin

* SVR4 vs. the rest of the world.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]