This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: cin/cout as reference objects [Re: AIX I/O failures]
- To: rth at redhat dot com
- Subject: Re: cin/cout as reference objects [Re: AIX I/O failures]
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 25 Jan 2001 19:06:50 -0800
- Cc: libstdc++ at sources dot redhat dot com
- Organization: CodeSourcery, LLC
- References: <20010125184729.A1844@redhat.com>
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
Richard> You should therefore be *extremely* cautious in exporting
Richard> anything from a shared library that isn't a function or a
Richard> built-in type such as a pointer.
Thanks for the detailed analysis. That's very interesting.
What you say, though, applies to the *original* approach as well, so
we're no better off than we were then, if I understand correctly.
(Because all I did was change the *type* of an aggregate, not its
existence.)
So, you're information argues in favor of Gaby's proposal -- the
indirection protects you against changes in the sizes of the object,
from the ABI point of view.
But, that doesn't really do any good, because there are inline
functions on ostreams anyhow, and because users can say `sizeof
(cout)' in their programs, and if the library implementors change the
size of the stream, those folks are going to be hosted anyhow,
regardless of the shared object/linker thing, right?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com