This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Problem with shared libraries, exceptions, and global constructors


Richard Henderson <rth@redhat.com> writes:

| But the same problem ocurrs with any other sort of global state
| that needs constructing.  E.g. standard io.

But for standard IO, there is a standard modular idiom,
e.g. std::ios::Init to help a given translation unit to make
sure that the IO objects are correctly constructed in that translation
unit before use, and their integration in a larger component/program
does not pose problems.  Relying a global ordering is a recipe for
disaster. 

-- Gaby


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