re PR libstdc++/8716 (std::string( NULL, 0 ) throws exception also on zero length)
authorPhil Edwards <pme@gcc.gnu.org>
Thu, 28 Nov 2002 21:28:20 +0000 (21:28 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Thu, 28 Nov 2002 21:28:20 +0000 (21:28 +0000)
2002-11-28  Phil Edwards  <pme@gcc.gnu.org>

PR libstdc++/8716
* testsuite/21_strings/ctor_copy_dtor.cc (test05):  Also test
the NULL-pointer, zero-size case.

From-SVN: r59616

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc

index 5efdd974f97b1abd2c2bd1c14b8cffde9db577e8..099c5337944a97858a31ead43e8e7649683cbde8 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-28  Phil Edwards  <pme@gcc.gnu.org>
+
+       PR libstdc++/8716
+       * testsuite/21_strings/ctor_copy_dtor.cc (test05):  Also test
+       the NULL-pointer, zero-size case.
+
 2002-11-28  Jonathan Wakely  <redi@gcc.gnu.org>
        * docs/html/faq/index.html: Add tip about a namespace for extensions.
 
index 63c8be429940792192c24b2f2ba000f7e350faca..c45e66a4cd44a0ed9554e29d4f4322d420196c49 100644 (file)
@@ -222,6 +222,10 @@ void test05()
 
   std::vector<char> empty;
   std::string empty2(empty.begin(), empty.end());
+
+  // libstdc++/8716 (same underlying situation, same fix)
+  char const * s = NULL;
+  std::string zero_length_built_with_NULL(s,0);
 }
 
 int main()