This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Inconsistency in I/O packages
- To: libstdc++ at sources dot redhat dot com
- Subject: Inconsistency in I/O packages
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 15 Nov 2000 19:51:32 -0800
- Organization: CodeSourcery, LLC
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