diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2007-03-22 16:43:41 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2007-03-22 16:43:41 +0000 |
commit | 803f183a9464aeba39bc369c2d39ca3b9a986e78 (patch) | |
tree | 553325d5de589f61a711c5eeda77fa3e6f3342b7 | |
parent | 1e863adf8376bff6e3ec741101eae39063f1a98d (diff) | |
download | gcc-803f183a9464aeba39bc369c2d39ca3b9a986e78.zip gcc-803f183a9464aeba39bc369c2d39ca3b9a986e78.tar.gz gcc-803f183a9464aeba39bc369c2d39ca3b9a986e78.tar.bz2 |
functions_std.cc: Without C99 support, _GLIBCXX_USE_WCHAR_T not defined, so dg-require-c-std.
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, 48 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a01ad67..fea34d7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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<>&): diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index 4a0b4db..6fe4140 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -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. diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index e3ca800..9e34d74 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -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 diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 02de25c..8353333 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -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 = diff --git a/libstdc++-v3/include/tr1/cfenv b/libstdc++-v3/include/tr1/cfenv index a468526..dc9fff8 100644 --- a/libstdc++-v3/include/tr1/cfenv +++ b/libstdc++-v3/include/tr1/cfenv @@ -38,7 +38,7 @@ #if _GLIBCXX_USE_C99_FENV_TR1 -#include <fenv.h> +#include_next <fenv.h> #undef feclearexcept #undef fegetexceptflag diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc index 4840dfd..ce87fe9 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc index 377cbdc..52ab913 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc index f7cd6a7..b09d50a 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc index 88871fa..a8a56d2 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc index f8a48cf..6ba3ea0 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc index 40731c4..a9a718f 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/fstream/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/fstream/types_std.cc index 9707680..392f3ad 100644 --- a/libstdc++-v3/testsuite/27_io/headers/fstream/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/fstream/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/iostream/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/iostream/synopsis.cc index b2f0e2f..2e559ed 100644 --- a/libstdc++-v3/testsuite/27_io/headers/iostream/synopsis.cc +++ b/libstdc++-v3/testsuite/27_io/headers/iostream/synopsis.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/iostream/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/iostream/types_std.cc index 881b52b..7319645 100644 --- a/libstdc++-v3/testsuite/27_io/headers/iostream/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/iostream/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/istream/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/istream/types_std.cc index 16f9680..265de49 100644 --- a/libstdc++-v3/testsuite/27_io/headers/istream/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/istream/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/ostream/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/ostream/types_std.cc index 973b2a0..78e5a4d 100644 --- a/libstdc++-v3/testsuite/27_io/headers/ostream/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/ostream/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/sstream/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/sstream/types_std.cc index c6ebcbb..19298e3 100644 --- a/libstdc++-v3/testsuite/27_io/headers/sstream/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/sstream/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/27_io/headers/streambuf/types_std.cc b/libstdc++-v3/testsuite/27_io/headers/streambuf/types_std.cc index ca11254..3f4fdd5 100644 --- a/libstdc++-v3/testsuite/27_io/headers/streambuf/types_std.cc +++ b/libstdc++-v3/testsuite/27_io/headers/streambuf/types_std.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index a8e8a31..3c1cd5d 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -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 diff --git a/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc b/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc index 682593c..c4e2e9c 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-require-c-std "" } // 2007-02-04 Benjamin Kosnik <bkoz@redhat.com> // |