functions_std.cc: Without C99 support, _GLIBCXX_USE_WCHAR_T not defined, so dg-requir...
authorBenjamin Kosnik <bkoz@redhat.com>
Thu, 22 Mar 2007 16:43:41 +0000 (16:43 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 22 Mar 2007 16:43:41 +0000 (16:43 +0000)
2007-03-22  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/21_strings/headers/cstdlib/functions_std.cc: Without
C99 support, _GLIBCXX_USE_WCHAR_T not defined, so
dg-require-c-std.
* testsuite/tr1/6_containers/headers/functional/synopsis.cc: Same.
* testsuite/27_io/headers/iostream/synopsis.cc: Same.
* testsuite/27_io/headers/streambuf/types_std.cc: Same.
* testsuite/27_io/headers/sstream/types_std.cc: Same.
* testsuite/27_io/headers/ostream/types_std.cc: Same.
* testsuite/27_io/headers/istream/types_std.cc: Same.
* testsuite/27_io/headers/iostream/types_std.cc: Same.
* testsuite/27_io/headers/fstream/types_std.cc: Same.
* testsuite/21_strings/headers/string/types_std.cc: Same.
* testsuite/21_strings/headers/cwctype/functions_std.cc: Same.
* testsuite/21_strings/headers/cwctype/types_std.cc: Same.
* testsuite/21_strings/headers/cwchar/functions_std.cc: Same.
* testsuite/21_strings/headers/cwchar/types_std.cc: Same.

* include/Makefile.am (c_compatibility_headers): Add fenv.h.
* include/Makefile.in: Regenerate.
* configure.host: Update comment.

From-SVN: r123130

20 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/configure.host
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/tr1/cfenv
libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc
libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc
libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc
libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc
libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc
libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc
libstdc++-v3/testsuite/27_io/headers/fstream/types_std.cc
libstdc++-v3/testsuite/27_io/headers/iostream/synopsis.cc
libstdc++-v3/testsuite/27_io/headers/iostream/types_std.cc
libstdc++-v3/testsuite/27_io/headers/istream/types_std.cc
libstdc++-v3/testsuite/27_io/headers/ostream/types_std.cc
libstdc++-v3/testsuite/27_io/headers/sstream/types_std.cc
libstdc++-v3/testsuite/27_io/headers/streambuf/types_std.cc
libstdc++-v3/testsuite/lib/libstdc++.exp
libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc

index a01ad67..fea34d7 100644 (file)
@@ -1,3 +1,28 @@
+2007-03-22  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/21_strings/headers/cstdlib/functions_std.cc: Without
+       C99 support, _GLIBCXX_USE_WCHAR_T not defined, so
+       dg-require-c-std.
+       * testsuite/tr1/6_containers/headers/functional/synopsis.cc: Same.
+       * testsuite/27_io/headers/iostream/synopsis.cc: Same.
+       * testsuite/27_io/headers/streambuf/types_std.cc: Same.
+       * testsuite/27_io/headers/sstream/types_std.cc: Same.
+       * testsuite/27_io/headers/ostream/types_std.cc: Same.
+       * testsuite/27_io/headers/istream/types_std.cc: Same.
+       * testsuite/27_io/headers/iostream/types_std.cc: Same.
+       * testsuite/27_io/headers/fstream/types_std.cc: Same.
+       * testsuite/21_strings/headers/string/types_std.cc: Same.
+       * testsuite/21_strings/headers/cwctype/functions_std.cc: Same.
+       * testsuite/21_strings/headers/cwctype/types_std.cc: Same.
+       * testsuite/21_strings/headers/cwchar/functions_std.cc: Same.
+       * testsuite/21_strings/headers/cwchar/types_std.cc: Same.
+       
+       * include/Makefile.am (c_compatibility_headers): Add fenv.h.
+       * include/Makefile.in: Regenerate.
+       * configure.host: Update comment.
+
+       * include/tr1/cfenv: Use include_next.
+
 2007-03-19  Paolo Carlini  <pcarlini@suse.de>
 
        * include/tr1/tuple (get(_Tuple_impl<>&, get(const _Tuple_impl<>&):
index 4a0b4db..6fe4140 100644 (file)
@@ -22,7 +22,7 @@
 #
 #   os_include_dir         OS-specific directory, defaults to os/generic.
 #
-#   c_model                the "C" header model, defaults to c_std.
+#   c_model                the "C" header model, defaults to c_global.
 #
 #   c_compatibility        if "C" compatibility headers are necessary,
 #                          defaults to no.
index e3ca800..9e34d74 100644 (file)
@@ -635,6 +635,7 @@ endif
 if GLIBCXX_C_HEADERS_C_GLOBAL
 c_compatibility_headers = \
        ${c_compatibility_srcdir}/complex.h \
+       ${c_compatibility_srcdir}/fenv.h \
        ${c_compatibility_srcdir}/tgmath.h 
 endif
 
index 02de25c..8353333 100644 (file)
@@ -860,6 +860,7 @@ c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
 c_compatibility_builddir = .
 @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@c_compatibility_headers = \
 @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@      ${c_compatibility_srcdir}/complex.h \
+@GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@      ${c_compatibility_srcdir}/fenv.h \
 @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@      ${c_compatibility_srcdir}/tgmath.h 
 
 @GLIBCXX_C_HEADERS_C_STD_TRUE@c_compatibility_headers = 
index a468526..dc9fff8 100644 (file)
@@ -38,7 +38,7 @@
 
 #if _GLIBCXX_USE_C99_FENV_TR1
 
-#include <fenv.h>
+#include_next <fenv.h>
 
 #undef feclearexcept
 #undef fegetexceptflag
index f7cd6a7..b09d50a 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index f8a48cf..6ba3ea0 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index 40731c4..a9a718f 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index 9707680..392f3ad 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index b2f0e2f..2e559ed 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index 881b52b..7319645 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index 16f9680..265de49 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index 973b2a0..78e5a4d 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index c6ebcbb..19298e3 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index ca11254..3f4fdd5 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
index a8e8a31..3c1cd5d 100644 (file)
@@ -579,6 +579,7 @@ proc check_v3_target_fileio { } {
     return $et_fileio_saved
 }
 
+# Eventually we want C90/C99 determining and switching from this.
 proc check_v3_target_c_std { } {
     global et_c_std_saved
     global et_c_std_target_name
@@ -606,15 +607,19 @@ proc check_v3_target_c_std { } {
 
        # Set up, compile, and execute a C++ test program that tries to use
        # C99 functionality.
+        # For math bits, could use check_effective_target_c99_math.
        set src fileio[pid].cc
        set exe fileio[pid].x
 
        set f [open $src "w"]
        puts $f "#include <tr1/cmath>"
+       puts $f "#include <cstdlib>"
        puts $f "int main ()"
        puts $f "{"
        puts $f "  float f = 45.55;"
        puts $f "  int i = std::tr1::isnan(f);"
+       puts $f "  "
+       puts $f "  using std::wctomb;"
        puts $f "  return 0;"
        puts $f "}" 
        close $f