libstdc++/325

Phil Edwards pedwards@disaster.jaj.com
Sun Apr 1 00:00:00 GMT 2001


The following reply was made to PR libstdc++/325; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: gcc-gnats@gcc.gnu.org, heiko.scheit@mpi-hd.mpg.de
Subject: Re: libstdc++/325
Date: Mon, 29 Jan 2001 09:49:09 -0500

 On Sun, Jan 28, 2001 at 10:16:09AM +0000, Neil Booth wrote:
 > Phil Edwards wrote:-
 > 
 > > So... should a string literal consisting only of the NUL character (with
 > > an implied second NUL terminator) become an empty string?  What is the
 > > correct behavior for memcmp when one of its arguments is an empty string?
 > > And when the limiting character count is zero?  What is the sound of one
 > > string matching?  :-)
 > > 
 > > The above call to memcmp returns zero, a match.  Since memcmp matches on
 > > the very first call, the string::find() returns a position of 0 -- which
 > > is correct as far as string::find knows.
 > 
 > Hi Phil,
 > 
 > Doh, I think you're right and we can close this report.  Thanks,
 
 Okay, I'll close this shortly.  I still think we should decide answers
 for the questions I asked in my first paragraph above.  (I'm honestly
 wondering those questions.  :-)
 
 Phil
 


More information about the Gcc-prs mailing list