This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: [v3] PR 10975


On Tue, Jan 06, 2004 at 02:27:46PM +0100, Paolo Carlini wrote:
> Jerry Quinn wrote:
> 
> >The following is a patch attempting to addresss PR 10975.
> >
> Hi Jerry. The patch itself it's safe but I'm not sure we really want
> to apply it now, without the corresponding DR. In fact, this situation
> happens again and again:
> 
> 1- We are unsure about the correct interpretation of something.
> 2- Nathan says: hey, the following is obviously ;) what we(I) wanted: ...

For the record, I didn't have anything to do with stringstream.

> 3- Someone replies: the actual standard says something different/ambiguous!
> 4- Nathan says: you are right: Defect, immediately! (CC: Martin)
> 5- Martin works on the Defect Report
> 6- Sometimes in the future, thanks to Martin, the Defect appears
> 
> ;)
> 
> So, what we want to do, as a general policy?
> 
> Probably wait a bit more, 'til at least point 6-, if the issue isn't
> really obvious.

As I understand it, according to either version of the standard (pre- 
and post-DR) the current implementation is wrong.  The current standard
says that seeks should fail if the pointers are null, but in our current
implementation they are not (in fact) null.  So, yes, there really is a 
defect, and there really is a bug, but that defect had been confused 
with the bug that provoked PR 10975.  Jerry has elucidated the true 
source of 10975, and the fix, which is happily consistent with both the 
current standard and the (to-be-) proposed fix.  ICC8 might or might 
not be conformant (depending upon how they default-initialize their 
stringbuf's pointers) but may in any case be fixed similarly.

That stringbuf may be implemented so that seeking may succeed or fail
according to irrelevant implementation details is further evidence of 
a defect.

Nathan Myers
ncm@cantrip.org


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