summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr1/8_c_compatibility
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2006-02-03 21:40:07 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2006-02-03 21:40:07 +0000
commitaf66a43e88af67e5650e5a1f7f82428710988702 (patch)
treedde8e45b257a62925224bbd90a000f87dbade5b4 /libstdc++-v3/testsuite/tr1/8_c_compatibility
parentc37db700bcefc885b60cc1fae5faf5977f295886 (diff)
downloadgcc-af66a43e88af67e5650e5a1f7f82428710988702.tar.gz
cwchar: New.
2006-02-03 Paolo Carlini <pcarlini@suse.de> * include/tr1/cwchar: New. * include/tr1/cwctype: Likewise. * include/tr1/wchar.h: Likewise. * include/tr1/wctype.h: Likewise. * include/Makefile.am: Add. * testsuite/tr1/8_c_compatibility/cinttypes/functions: New. * testsuite/tr1/8_c_compatibility/cwctype/functions.cc: Likewise. * testsuite/tr1/headers.cc: Update. * acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Add <wchar.h> and <wctype.h> checks. * docs/html/ext/tr1.html: Update. * include/Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * testsuite/tr1/8_c_compatibility/cctype/functions.cc: Cosmetic tweak. From-SVN: r110562
Diffstat (limited to 'libstdc++-v3/testsuite/tr1/8_c_compatibility')
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cctype/functions.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc63
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cwctype/functions.cc40
3 files changed, 105 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cctype/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cctype/functions.cc
index 57d81f1ffc9..35c34f412d5 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cctype/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cctype/functions.cc
@@ -28,8 +28,8 @@ void test01()
{
#if _GLIBCXX_USE_C99_CTYPE_TR1
- int ch = 0, r;
- r = std::tr1::isblank(ch);
+ int ch = 0, ret;
+ ret = std::tr1::isblank(ch);
#endif
}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
new file mode 100644
index 00000000000..577868a1504
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
@@ -0,0 +1,63 @@
+// { dg-do compile }
+
+// 2006-02-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 8.6 Additions to header <cwchar>
+
+#include <tr1/cwchar>
+#include <cstdio>
+#include <cstdarg>
+
+#if _GLIBCXX_USE_WCHAR_T
+
+void test01()
+{
+#if _GLIBCXX_USE_C99_WCHAR_TR1
+
+ const wchar_t* nptr = 0;
+ const wchar_t* format = 0;
+ const wchar_t* s = 0;
+ wchar_t** endptr = 0;
+ FILE* stream = 0;
+ std::va_list arg = 0;
+
+ float fret;
+ long double ldret;
+ int ret;
+
+ fret = std::tr1::wcstof(nptr, endptr);
+ ldret = std::tr1::wcstold(nptr, endptr);
+ ret = std::tr1::vfwscanf(stream, format, arg);
+ ret = std::tr1::vswscanf(s, format, arg);
+ ret = std::tr1::vwscanf(format, arg);
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ int base = 0;
+ long long llret;
+ unsigned long long ullret;
+ llret = std::tr1::wcstoll(nptr, endptr, base);
+ ullret = std::tr1::wcstoull(nptr, endptr, base);
+#endif
+
+#endif
+}
+
+#endif
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwctype/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwctype/functions.cc
new file mode 100644
index 00000000000..5dc5a84b4d0
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwctype/functions.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+
+// 2006-02-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 8.32 Additions to header <cwctype>
+
+#include <tr1/cwctype>
+
+#if _GLIBCXX_USE_WCHAR_T
+
+void test01()
+{
+#if _GLIBCXX_USE_C99_WCTYPE_TR1
+
+ std::wint_t ch = 0;
+ int ret;
+ ret = std::tr1::iswblank(ch);
+
+#endif
+}
+
+#endif