This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] more istream::ignore cleanups
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, libstdc++ at gcc dot gnu dot org
- Date: 04 Jan 2005 03:23:42 +0100
- Subject: Re: [v3] more istream::ignore cleanups
- Organization: Integrable Solutions
- References: <20050103170317.22e9e578.bkoz@redhat.com><41D9D0DC.7090404@suse.de>
Paolo Carlini <pcarlini@suse.de> writes:
| The problem is, on 32-bit machines, LFS enabled, your file can be
| bigger that 2G, thus more than 2G chars to ignore, in general, whereas
| streamsize, being basically a ptrdiff_t, is still limited to 32-bit:
| we are at risk of *signed* integer overflow, which is absolutely
| verboten!!! Still, we want to allow the user to keep on using ignore,
| in the general, unlimited form, also on such platforms...
I think it is written somewhere in the rules that max() morally
corresponds to unbounded ignore, unless the stream is corrupted or EOF
is reached.
| If you want, I can add comments...
That would be most welcome. Thanks!
-- Gaby