This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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: [c++ stl] std::string bug?


> From: GwenaŽl Durand [mailto:Gwenael.dot.Durand@laposte.dot.net]
> Subject: [c++ stl] std::string bug?
> 
> It seems that one constructor of the std::string class or the 
> data() method
> doesn't work properly.
> 
> string::data() and string::c_str() are supposed to be 
> equivalent but don't always behave the same.
 I don't believe data() and c_str() are supposed to be the same.
 If I remember correctly, data() is not guaranteed to be null-terminated.
> 
> have a look at the following  code and its test.
> 
> ....?

> 
> PS: I update cygwin this morning => 1.3.9
 This is most likely irrelevant.
> gcc                 2.95.3-5
  This is interesting.  Now we can try this compiler on a non-cygwin system.
 I did and Irix 6.5 w g++ 2.95.3 gives the same result.
 This is fixed (assuming it's a bug  -- see above) in 3.0

 g++ 2.95 has a number of bugs that have been fixed in version 3 and above.
I don't imagine they'll be fixed.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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