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]

libstdc++ (was Re: GCC viciously beaten by ICC in trig test!)


On 15 Mar 2004, Gabriel Dos Reis wrote:

> I don't know the situation for Fortran 95 users, but my experience is
> that C++ users find it quite annoying when other standards hijack
> C++ standard headers rather than defining new ones for their purposes.
> So, the issue there (in C++ land) is radically different from that in C
> land.  [First, have C users include standard headers instead of
> prototyping "by hand" :-)]

On a related note I found it _extremely_ annoying when the iostream
libraries lost the close coupling with C stdio that the old iostream
(prior to Gcc 3.0) had.  Performance degraded significantly because of
this.  The performance situation may have improved, however it is still
imposable to get at the underlying file descriptor unless the stream was
created using a special constructor class.  Furthermore, the libstdc++
people can't seam to make on how to implement gcc extensions as they
method to get at the underlying file descriptor has changed several times:

  With 3.0 one could only create a stream with a c File *
  With 3.0.95 the fd() member function was reintroduced
  With 3.1 both extensions in 3.0 was removed and you had to use 
    a "special" file buffer with a god awful name  __gnu_cxx::stdio_filebuf.

I REALLY REALLY REALLY would like to so glibc provide a iostream library
that is implemented using the same internal structures that the C stdio
used so that C++ and C io can be intermixed on the same stream with no
performance lost.  Furthermore I would like to be able to use printf/scanf
and friends with the C++ iostream as many times they are more convenient
to use and using lots of << can easily lead to code bloat.  This is true
even if the << methods are not inline because a separate function call has
to be made for each << method while printf uses a single function call.

I would also like to see a iostream implementation that supports getting 
at the underlying file descriptor written into the POSIX standard, but I 
don't think that will happen any time soon.

-- 
http://kevin.atkinson.dhs.org


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