summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-19 22:55:07 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-19 22:55:07 +0000
commit23a9a84dbd9572c13aae7cdfec4579020c58821a (patch)
treecd64abf5f5b813d563c8b82658103a5022fc517e /libstdc++-v3
parent03c84da8d02166d70c97381fb5eb0cc3d848d2b2 (diff)
downloadgcc-23a9a84dbd9572c13aae7cdfec4579020c58821a.tar.gz
2000-12-19 Benjamin Kosnik <bkoz@fillmore.constant.com>
* configure.in: Don't turn on long long by default. * configure: Regenerate. * include/c/bits/std_cstdio.h: Remove c++config.h include. * src/locale.cc: Formatting tweaks. * testsuite/22_locale/ctype.cc (char<unsigned char>): Provide member functions. 2000-12-19 Loren J. Rittle <ljrittle@acm.org> * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog13
-rwxr-xr-xlibstdc++-v3/configure4
-rw-r--r--libstdc++-v3/configure.in2
-rw-r--r--libstdc++-v3/include/c/bits/std_cstdio.h1
-rw-r--r--libstdc++-v3/src/locale.cc3
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype.cc106
6 files changed, 121 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6215967e0e7..31c4a10bfc8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,16 @@
+2000-12-19 Benjamin Kosnik <bkoz@fillmore.constant.com>
+
+ * configure.in: Don't turn on long long by default.
+ * configure: Regenerate.
+ * include/c/bits/std_cstdio.h: Remove c++config.h include.
+ * src/locale.cc: Formatting tweaks.
+ * testsuite/22_locale/ctype.cc (char<unsigned char>): Provide
+ member functions.
+
+2000-12-19 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage.
+
2000-12-19 Mark Kettenis <kettenis@gnu.org>
* configure.target: Support the Hurd.
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 9139051bc0f..4dd963cfc5a 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -41,7 +41,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-c-mbchar enable multibyte (wide) characters [default=yes]"
ac_help="$ac_help
- --enable-long-long turns on 'long long' [default=yes]"
+ --enable-long-long turns on 'long long' [default=no]"
ac_help="$ac_help
--enable-cshadow-headers construct "shadowed" C header files for
g++ [default=no]"
@@ -2881,7 +2881,7 @@ if test "${enable_long_long+set}" = set; then
*) { echo "configure: error: Unknown argument to enable/disable long long" 1>&2; exit 1; } ;;
esac
else
- enable_long_long=yes
+ enable_long_long=no
fi
# Allow use of os-dependent settings, so that macros that turn on
diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in
index 2e8ee1d6090..2823853b844 100644
--- a/libstdc++-v3/configure.in
+++ b/libstdc++-v3/configure.in
@@ -36,7 +36,7 @@ GLIBCPP_CHECK_COMPILER_VERSION
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_C_MBCHAR([yes])
-GLIBCPP_ENABLE_LONG_LONG([yes])
+GLIBCPP_ENABLE_LONG_LONG([no])
GLIBCPP_ENABLE_SHADOW([no])
GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_ATOMICITY
diff --git a/libstdc++-v3/include/c/bits/std_cstdio.h b/libstdc++-v3/include/c/bits/std_cstdio.h
index cc22d4519d2..62a19aabf2b 100644
--- a/libstdc++-v3/include/c/bits/std_cstdio.h
+++ b/libstdc++-v3/include/c/bits/std_cstdio.h
@@ -36,7 +36,6 @@
#ifndef _CPP_CSTDIO
#define _CPP_CSTDIO 1
-#include <bits/c++config.h>
#include <bits/std_cstdarg.h>
#pragma GCC system_header
diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc
index 6c72c7f21b7..29dcc378f76 100644
--- a/libstdc++-v3/src/locale.cc
+++ b/libstdc++-v3/src/locale.cc
@@ -950,8 +950,7 @@ namespace std {
return __ret;
};
- ctype<wchar_t>::
- ~ctype() { }
+ ctype<wchar_t>::~ctype() { }
// NB: These ctype<wchar_t> methods are not configuration-specific,
// unlike the ctype<char> bits.
diff --git a/libstdc++-v3/testsuite/22_locale/ctype.cc b/libstdc++-v3/testsuite/22_locale/ctype.cc
index 4e9c9fe05dd..b51ee70932b 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype.cc
@@ -27,7 +27,109 @@ int mask ();
#include <locale>
// 2: Should be able to instantiate this for other types besides char, wchar_t
-class gnu_ctype: public std::ctype<unsigned char> { };
+typedef std::ctype<char> cctype;
+
+class gnu_ctype: public std::ctype<unsigned char>
+{
+private:
+ const cctype& _M_cctype;
+
+public:
+ explicit
+ gnu_ctype(size_t __refs = 0)
+ : std::ctype<unsigned char>(__refs),
+ _M_cctype(std::use_facet<cctype>(std::locale::classic()))
+ { }
+
+ ~gnu_ctype();
+
+protected:
+ virtual bool
+ do_is(mask __m, char_type __c) const
+ { return _M_cctype.is(__m, __c); }
+
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const
+ {
+ const char* __c = _M_cctype.is(reinterpret_cast<const char*>(__lo),
+ reinterpret_cast<const char*>(__hi), __vec);
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+ {
+ const char* __c = _M_cctype.scan_is(__m,
+ reinterpret_cast<const char*>(__lo),
+ reinterpret_cast<const char*>(__hi));
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+ {
+ const char* __c = _M_cctype.scan_is(__m,
+ reinterpret_cast<const char*>(__lo),
+ reinterpret_cast<const char*>(__hi));
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+ virtual char_type
+ do_toupper(char_type __c) const
+ { return _M_cctype.toupper(__c); }
+
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const
+ {
+ const char* __c = _M_cctype.toupper(reinterpret_cast<char*>(__lo),
+ reinterpret_cast<const char*>(__hi));
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+ virtual char_type
+ do_tolower(char_type __c) const
+ { return _M_cctype.tolower(__c); }
+
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const
+ {
+ const char* __c = _M_cctype.toupper(reinterpret_cast<char*>(__lo),
+ reinterpret_cast<const char*>(__hi));
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+ virtual char_type
+ do_widen(char __c) const
+ { return _M_cctype.widen(__c); }
+
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ {
+ const char* __c = _M_cctype.widen(reinterpret_cast<const char*>(__lo),
+ reinterpret_cast<const char*>(__hi),
+ reinterpret_cast<char*>(__dest));
+ return __c;
+ }
+
+ virtual char
+ do_narrow(char_type __c, char __dfault) const
+ { return _M_cctype.narrow(__c, __dfault); }
+
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi, char __dfault,
+ char* __dest) const
+ {
+ const char* __c = _M_cctype.narrow(reinterpret_cast<const char*>(__lo),
+ reinterpret_cast<const char*>(__hi),
+ __dfault,
+ reinterpret_cast<char*>(__dest));
+ return reinterpret_cast<const char_type*>(__c);
+ }
+
+};
+
+gnu_ctype::~gnu_ctype() { }
+
gnu_ctype facet01;
// 3: Sanity check ctype_base::mask bitmask requirements
@@ -45,7 +147,7 @@ test01()
m01 & m02;
m01 | m02;
m01 ^ m02;
- m01 ~ m02;
+ ~m01;
m01 &= m02;
m01 |= m02;
m01 ^= m02;