From f2752f1d6e41746b8d23390a9890065d650bf5c1 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 29 Jul 2008 17:06:24 +0000 Subject: [PATCH] utility: Include , per the current WP. 2008-07-29 Paolo Carlini * include/std/utility: Include , per the current WP. * testsuite/lib/libstdc++.exp (check_v3_target_cstdint): Tweak, don't use -std=gnu++0x unnecessarily. * testsuite/18_support/numeric_limits/char16_32_t.cc: Use dg-require-cstdint. * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Likewise. * testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc: Likewise. From-SVN: r138255 --- libstdc++-v3/ChangeLog | 11 +++++++++++ libstdc++-v3/include/std/utility | 1 + .../18_support/headers/cstdint/types_std_c++0x.cc | 9 +++------ .../18_support/numeric_limits/char16_32_t.cc | 5 +++-- libstdc++-v3/testsuite/lib/libstdc++.exp | 4 ++-- .../tr1/8_c_compatibility/cstdint/types_std_tr1.cc | 7 ++----- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 25f0d56f864..c50eeff39a9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2008-07-29 Paolo Carlini + + * include/std/utility: Include , per the current WP. + + * testsuite/lib/libstdc++.exp (check_v3_target_cstdint): Tweak, + don't use -std=gnu++0x unnecessarily. + * testsuite/18_support/numeric_limits/char16_32_t.cc: Use + dg-require-cstdint. + * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Likewise. + * testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc: Likewise. + 2008-07-28 Paolo Carlini PR libstdc++/36949 diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index 027d513ccca..8a006ca500b 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -85,6 +85,7 @@ # undef _GLIBCXX_INCLUDE_AS_CXX0X # endif # include +# include #endif #endif /* _GLIBCXX_UTILITY */ diff --git a/libstdc++-v3/testsuite/18_support/headers/cstdint/types_std_c++0x.cc b/libstdc++-v3/testsuite/18_support/headers/cstdint/types_std_c++0x.cc index 7a5363c4f74..eff1d6dd27c 100644 --- a/libstdc++-v3/testsuite/18_support/headers/cstdint/types_std_c++0x.cc +++ b/libstdc++-v3/testsuite/18_support/headers/cstdint/types_std_c++0x.cc @@ -1,7 +1,8 @@ -// { dg-options "-std=gnu++0x" } // { dg-do compile } +// { dg-options "-std=gnu++0x" } +// { dg-require-cstdint "" } -// Copyright (C) 2007 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008 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 @@ -23,8 +24,6 @@ void test01() { -#if _GLIBCXX_USE_C99_STDINT_TR1 - typedef std::int8_t my_int8_t; typedef std::int16_t my_int16_t; typedef std::int32_t my_int32_t; @@ -53,6 +52,4 @@ void test01() typedef std::uint_least64_t my_uint_least64_t; typedef std::uintmax_t my_uintmax_t; typedef std::uintptr_t my_uintptr_t; - -#endif } diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc index c2957506cb0..84499480146 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc @@ -1,4 +1,6 @@ // { dg-options "-std=gnu++0x" } +// { dg-require-cstdint "" } + // 2008-05-20 Paolo Carlini // // Copyright (C) 2008 Free Software Foundation @@ -69,9 +71,8 @@ template int main() { -#if _GLIBCXX_USE_C99_STDINT_TR1 do_test(); do_test(); -#endif + return 0; } diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 29258c35b4c..afcaa19d136 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1055,7 +1055,7 @@ proc check_v3_target_cstdint { } { set exe cstdint[pid].exe set f [open $src "w"] - puts $f "#include " + puts $f "#include " puts $f "int main()" puts $f "#ifdef _GLIBCXX_USE_C99_STDINT_TR1" puts $f "{ return 0; }" @@ -1063,7 +1063,7 @@ proc check_v3_target_cstdint { } { close $f set cxxflags_saved $cxxflags - set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -std=gnu++0x -Werror" + set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror" set lines [v3_target_compile $src $exe executable ""] set cxxflags $cxxflags_saved diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc index d7159739803..3826713f753 100644 --- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc @@ -1,8 +1,9 @@ // { dg-do compile } +// { dg-require-cstdint "" } // 2006-01-29 Paolo Carlini // -// Copyright (C) 2006 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2008 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 @@ -26,8 +27,6 @@ void test01() { -#if _GLIBCXX_USE_C99_STDINT_TR1 - typedef std::tr1::int8_t my_int8_t; typedef std::tr1::int16_t my_int16_t; typedef std::tr1::int32_t my_int32_t; @@ -56,6 +55,4 @@ void test01() typedef std::tr1::uint_least64_t my_uint_least64_t; typedef std::tr1::uintmax_t my_uintmax_t; typedef std::tr1::uintptr_t my_uintptr_t; - -#endif } -- 2.30.2