This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Re: [CVS gcc toplevel patch] v2 + v3, --enable-libstdcxx-v3


> Ah, it also depends on the streambuf vptr following the data for
> _IO_FILE.  

Yes, that's the primary problem. In the old ABI, a POD primary base
was always at offset 0; in the new ABI, there is always a vtable at
offset 0.

> class streambuf: private foo, public _IO_FILE, public streambuf_impl
> 
> So it would have two vptrs, including one in the expected place...but
> that's pretty nasty.

It might not help much. I believe libio also assumes that class
streambuf is the same as struct IO_FILE_plus, and allocates such
structures, e.g. in _IO_fdopen. They would not be usable as
streambufs, even with such a definition of streambuf. I don't know
whether that is officially supported, though.

The choices appear to be the nasty hack, or breaking binary
compatibility in glibc. glibc could include both versions of libio for
compatibility, but only one version should be in use at any time, for
a given program.

Regards,
Martin

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