This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[v3] libstdc++/19829


Hi,

sorry... Tested x86-linux, committed mainline and 3_4.

Paolo.

/////////////
2005-02-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/19829
	* testsuite/21_strings/basic_string/find/char/3.cc: Fix the test
	at line #66 to not access str_lit01 beyond its end.
	* testsuite/21_strings/basic_string/find/wchar_t/3.cc: Likewise.
diff -urN libstdc++-v3-orig/testsuite/21_strings/basic_string/find/char/3.cc libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc
--- libstdc++-v3-orig/testsuite/21_strings/basic_string/find/char/3.cc	2003-09-23 22:02:07.000000000 +0200
+++ libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc	2005-02-16 11:56:40.000000000 +0100
@@ -1,6 +1,6 @@
 // 2003-05-04  Paolo Carlini  <pcarlini@unitus.it>
 
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -63,7 +63,7 @@
   // size_type find_first_not_of(const char* s, size_type pos, size_type n) const;
   csz01 = str01.find_first_not_of(str_lit01, 0, 0);
   VERIFY( csz01 == 0 );
-  csz01 = str01.find_first_not_of(str_lit01, 0, 10);
+  csz01 = str01.find_first_not_of(str_lit01, 0, 8);
   VERIFY( csz01 == 8 );
   csz01 = str01.find_first_not_of(str_lit01, 10, 0);
   VERIFY( csz01 == 10 );
diff -urN libstdc++-v3-orig/testsuite/21_strings/basic_string/find/wchar_t/3.cc libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
--- libstdc++-v3-orig/testsuite/21_strings/basic_string/find/wchar_t/3.cc	2003-09-23 22:02:07.000000000 +0200
+++ libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc	2005-02-16 11:56:50.000000000 +0100
@@ -1,6 +1,6 @@
 // 2003-05-04  Paolo Carlini  <pcarlini@unitus.it>
 
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -63,7 +63,7 @@
   // size_type find_first_not_of(const char* s, size_type pos, size_type n) const;
   csz01 = str01.find_first_not_of(str_lit01, 0, 0);
   VERIFY( csz01 == 0 );
-  csz01 = str01.find_first_not_of(str_lit01, 0, 10);
+  csz01 = str01.find_first_not_of(str_lit01, 0, 8);
   VERIFY( csz01 == 8 );
   csz01 = str01.find_first_not_of(str_lit01, 10, 0);
   VERIFY( csz01 == 10 );

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