diff options
author | Paolo Carlini <pcarlini@unitus.it> | 2003-10-09 21:10:56 +0200 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-10-09 19:10:56 +0000 |
commit | 2f800bccecbaf64ae889ea7da8344b5bc7b29145 (patch) | |
tree | 6fc8259baed5ace8e6cc49ec4a57d83ceb21a2cb /libstdc++-v3/testsuite | |
parent | b18ff0cdda2c2502dae22504ed7c303ac021bad4 (diff) | |
download | gcc-2f800bccecbaf64ae889ea7da8344b5bc7b29145.zip gcc-2f800bccecbaf64ae889ea7da8344b5bc7b29145.tar.gz gcc-2f800bccecbaf64ae889ea7da8344b5bc7b29145.tar.bz2 |
re PR libstdc++/11844 (Incorrect values of ctype_base::alnum and ctype_base::graph)
2003-10-09 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/11844
* config/os/aix/ctype_base.h: Fix 'alnum' and 'graph'
to conform to the requirements of 22.2.1.
* config/os/bsd/freebsd/ctype_base.h: Likewise.
* config/os/djgpp/ctype_base.h: Likewise.
* config/os/generic/ctype_base.h: Likewise.
* config/os/gnu-linux/ctype_base.h: Likewise.
* config/os/hpux/ctype_base.h: Likewise.
* config/os/irix/irix6.5/ctype_base.h: Likewise.
* config/os/solaris/solaris2.6/ctype_base.h: Likewise.
* config/os/solaris/solaris2.7/ctype_base.h: Likewise.
* testsuite/22_locale/ctype/11844.cc: New.
* config/locale/generic/ctype_members.cc (do_is):
Generically, use a bitmasksize of 15 (instead of 10), since
we don't know the numerical encoding of the various categories
in the underlying /usr/include/ctype.h.
From-SVN: r72281
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/ctype/11844.cc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/11844.cc b/libstdc++-v3/testsuite/22_locale/ctype/11844.cc new file mode 100644 index 0000000..894fdfc --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/ctype/11844.cc @@ -0,0 +1,47 @@ +// Copyright (C) 2003 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// 22.2.1 The ctype category + +#include <locale> +#include <testsuite_hooks.h> + +// libstdc++/11844 +void test01() +{ + typedef std::ctype_base ctb; + bool test __attribute__((unused)) = true; + + VERIFY( ctb::alnum == (ctb::alpha | ctb::digit) ); + VERIFY( ctb::graph == (ctb::alnum | ctb::punct) ); +} + +int main() +{ + test01(); + return 0; +} |