[RFC/Patch] libstdc++/14320 aka class type streamoff doesn't work :(

Paolo Carlini pcarlini@suse.de
Fri Feb 27 17:20:00 GMT 2004


Hi,

libstdc++/14252 was only the tip of the iceberg: as pointed out by Pétur
a few days ago:

"In fact the standard requires that difference_type provides those
operators [24.1]:

   For every iterator type X for which equality is defined, there is a
   corresponding signed integral type called the difference type of the
   iterator."

this basically kills a class streamoff, and, if we really want to be
picky, also kills LFS on 32 bit machines (where really matters, 64 bit
machines have it automatically), since long long is not a C++ signed
integral type (Pétur considers this a defect in the standard)

Thus the below: it seems to me that the best we can do for streamoff is
essentially returning to what we had in 3_3. This implies giving away
some type safety (i.e., some QoI) and also that the issue with LFS is 
still there, but otherwise seems OK. On glibc platforms we get an XPASS,
since int64t is actually a typedef for long long.

What do you think? Disabling at build time LFS, I don't believe this is
an option, since for the ABI we already agreed that streamoff should be
unconditionally a 64 bit type.

Paolo.

//////////////

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_14320
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040227/4cc511da/attachment.ksh>


More information about the Libstdc++ mailing list