From: Benjamin Kosnik Date: Tue, 19 Dec 2000 22:55:07 +0000 (+0000) Subject: [multiple changes] X-Git-Tag: prereleases/libstdc++-2.92~2122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=205c6f170960eebb23a90a2acc165b129a7b304d;p=thirdparty%2Fgcc.git [multiple changes] 2000-12-19 Benjamin Kosnik * 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): Provide member functions. 2000-12-19 Loren J. Rittle * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage. From-SVN: r38388 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6215967e0e7f..31c4a10bfc8d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2000-12-19 Benjamin Kosnik + + * 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): Provide + member functions. + +2000-12-19 Loren J. Rittle + + * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage. + 2000-12-19 Mark Kettenis * configure.target: Support the Hurd. diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 9139051bc0fb..4dd963cfc5a9 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 2e8ee1d60909..2823853b8444 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 cc22d4519d2a..62a19aabf2b9 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 #include #pragma GCC system_header diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 6c72c7f21b79..29dcc378f764 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -950,8 +950,7 @@ namespace std { return __ret; }; - ctype:: - ~ctype() { } + ctype::~ctype() { } // NB: These ctype methods are not configuration-specific, // unlike the ctype bits. diff --git a/libstdc++-v3/testsuite/22_locale/ctype.cc b/libstdc++-v3/testsuite/22_locale/ctype.cc index 4e9c9fe05dd2..b51ee70932bc 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype.cc @@ -27,7 +27,109 @@ int mask (); #include // 2: Should be able to instantiate this for other types besides char, wchar_t -class gnu_ctype: public std::ctype { }; +typedef std::ctype cctype; + +class gnu_ctype: public std::ctype +{ +private: + const cctype& _M_cctype; + +public: + explicit + gnu_ctype(size_t __refs = 0) + : std::ctype(__refs), + _M_cctype(std::use_facet(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(__lo), + reinterpret_cast(__hi), __vec); + return reinterpret_cast(__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(__lo), + reinterpret_cast(__hi)); + return reinterpret_cast(__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(__lo), + reinterpret_cast(__hi)); + return reinterpret_cast(__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(__lo), + reinterpret_cast(__hi)); + return reinterpret_cast(__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(__lo), + reinterpret_cast(__hi)); + return reinterpret_cast(__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(__lo), + reinterpret_cast(__hi), + reinterpret_cast(__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(__lo), + reinterpret_cast(__hi), + __dfault, + reinterpret_cast(__dest)); + return reinterpret_cast(__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;