mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 10:37:02 +08:00
locale.cc (locale::locale(const char*)): Deal with locales named "".
2001-12-13 Benjamin Kosnik <bkoz@redhat.com> libstdc++/3679 * src/locale.cc (locale::locale(const char*)): Deal with locales named "". * testsuite/22_locale/ctor_copy_dtor.cc (test01): Modify. From-SVN: r47968
This commit is contained in:
parent
3af44a8e3f
commit
85230e5255
@ -1,3 +1,10 @@
|
||||
2001-12-13 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
libstdc++/3679
|
||||
* src/locale.cc (locale::locale(const char*)): Deal with locales
|
||||
named "".
|
||||
* testsuite/22_locale/ctor_copy_dtor.cc (test01): Modify.
|
||||
|
||||
2001-12-12 Paolo Carlini <pcarlini@unitus.it>
|
||||
|
||||
* include/ext/ropeimpl.h (rope::_S_leaf_concat_char_iter,
|
||||
|
@ -204,6 +204,8 @@ namespace std
|
||||
_S_initialize();
|
||||
if (strcmp(__s, "C") == 0 || strcmp(__s, "POSIX") == 0)
|
||||
(_M_impl = _S_classic)->_M_add_reference();
|
||||
else if (strcmp(__s, "") == 0)
|
||||
_M_impl = new _Impl(setlocale(LC_ALL, __s), 1);
|
||||
else
|
||||
_M_impl = new _Impl(__s, 1);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ void test01()
|
||||
locale loc07("");
|
||||
VERIFY (loc07 != loc01);
|
||||
VERIFY (loc07 != loc02);
|
||||
VERIFY (loc07.name() == "");
|
||||
VERIFY (loc07.name() != "");
|
||||
try
|
||||
{ locale loc08(static_cast<const char*>(NULL)); }
|
||||
catch(runtime_error& obj)
|
||||
|
Loading…
Reference in New Issue
Block a user