aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Edwards <pme@gcc.gnu.org>2002-11-28 21:28:20 +0000
committerPhil Edwards <pme@gcc.gnu.org>2002-11-28 21:28:20 +0000
commitccb128db7a4b3422577d6311a3baa63c4acbfc04 (patch)
tree209bc97401f3cc2a7051a22fecd79ae41d6b7e1a
parentfcb204cecf7ab0ededeb2a7d954ea74194a24c18 (diff)
downloadgcc-ccb128db7a4b3422577d6311a3baa63c4acbfc04.zip
gcc-ccb128db7a4b3422577d6311a3baa63c4acbfc04.tar.gz
gcc-ccb128db7a4b3422577d6311a3baa63c4acbfc04.tar.bz2
re PR libstdc++/8716 (std::string( NULL, 0 ) throws exception also on zero length)
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
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc4
2 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5efdd97..099c533 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc
index 63c8be4..c45e66a 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<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()