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