Libgcc symbols
Zack Weinberg
zackw@Stanford.EDU
Mon Apr 16 09:44:00 GMT 2001
On Mon, Apr 16, 2001 at 12:42:14PM -0400, Phil Edwards wrote:
> > Why we still have libio in-tree at all is another question. (I have
> > never understood why iostreams aren't a layer of paint on top of
> > the public stdio interface.)
>
> Right now, it is. Which is a pity, because it's another layer of buffering
> and function calls. Efficiency drops considerably on some platforms when
> iostreams has to funnel everything through stdio.
Then it's not thin enough to be a layer of paint, is it?
What I have in mind is a thing where
cout << "hello world\n";
gets inline-expanded at compile time down to
fputs("hello world\n", stdout);
and even when it can't be that simple, iostreams do no buffering at
all themselves; they leave all that to stdio. So worst case you have
a few extra function calls.
I don't know any reason why this is not feasible, but I don't know
much about C++ at all, so there probably is a good reason why not.
zw
More information about the Gcc
mailing list