From ccb128db7a4b3422577d6311a3baa63c4acbfc04 Mon Sep 17 00:00:00 2001 From: Phil Edwards Date: Thu, 28 Nov 2002 21:28:20 +0000 Subject: [PATCH] re PR libstdc++/8716 (std::string( NULL, 0 ) throws exception also on zero length) 2002-11-28 Phil Edwards 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 | 6 ++++++ libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5efdd974f97..099c5337944 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2002-11-28 Phil Edwards + + PR libstdc++/8716 + * testsuite/21_strings/ctor_copy_dtor.cc (test05): Also test + the NULL-pointer, zero-size case. + 2002-11-28 Jonathan Wakely * docs/html/faq/index.html: Add tip about a namespace for extensions. diff --git a/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc index 63c8be42994..c45e66a4cd4 100644 --- a/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc +++ b/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc @@ -222,6 +222,10 @@ void test05() std::vector 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() -- 2.30.2