This is the mail archive of the libstdc++@sources.redhat.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]

Inconsistency in I/O packages



In c_io_stdio.h we have:

  typedef size_t        streamsize; // Signed integral type

That's false: it's unsigned.  And, in c_io_libio.h, we have:

  typedef _IO_ssize_t   streamsize;

Presumably we should be using ptrdiff_t in c_io_stdio.h?  That's the
stanard C type likely to be the signed equivalent of size_t.

On the other hand, why should we be using a signed type for streamsize
at all?  I would have that we would use unsigned for streamsize, and
signed for streamoff.

In any case, we should be consistent; we otherwise get signed
vs. unsigned warnings.

Thoughts?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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