diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 00:56:12 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 00:56:12 +0000 |
commit | c1130929d9cd9d0c652e814078d176ff77eac93f (patch) | |
tree | 1f50c43fa2ecac3c99fa0e3ce264c9a4263ca545 /libstdc++-v3 | |
parent | 15877a9ce176cdaa4e0ce2a7a0d659b39d70d3d8 (diff) | |
download | gcc-c1130929d9cd9d0c652e814078d176ff77eac93f.tar.gz |
2009-08-11 Benjamin Kosnik <bkoz@redhat.com>
* include/precompiled/extc++.h: Don't include TR1 if C++0x.
* include/precompiled/stdc++.h: Don't include cassert if
_GLIBCXX_NO_ASSERT defined.
* include/ext/cast.h (_GLIBCXX_BEGIN_NAMESPACE): Remove extra
semi-colon.
* include/ext/pointer.h (_GCC_CXX_POINTER_COMPARISON_OPERATION_SET):
Same.
* testsuite/17_intro/headers/all.cc: Move into dialect-specific
directory.
* testsuite/17_intro/headers/all_pedantic_errors.cc: Same.
* testsuite/17_intro/headers/all_assert_neg.cc: Same.
* testsuite/17_intro/headers/all_c++200x_compatibility.cc: Same.
* testsuite/17_intro/headers/c++1998/all.cc: Use extc++.h include.
* testsuite/17_intro/headers/c++1998/stdc++.cc: Converted all.cc,
use stdc++.h include.
* testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc: Same.
* testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc: Same.
* testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc: Same.
* testsuite/17_intro/headers/c++1998/all_no_exceptions.cc: New.
* testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc: To...
* testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc
...this.
* testsuite/17_intro/headers/c++200x/all.cc: To...
* testsuite/17_intro/headers/c++200x/stdc++.cc: ..this.
* testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: To...
* testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc:
...this.
* testsuite/17_intro/headers/c++200x/all_no_exceptions.cc: New.
* testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
22 files changed, 428 insertions, 1103 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 628ce72732e..d9757457c4e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,37 @@ +2009-08-11 Benjamin Kosnik <bkoz@redhat.com> + + * include/precompiled/extc++.h: Don't include TR1 if C++0x. + * include/precompiled/stdc++.h: Don't include cassert if + _GLIBCXX_NO_ASSERT defined. + * include/ext/cast.h (_GLIBCXX_BEGIN_NAMESPACE): Remove extra + semi-colon. + * include/ext/pointer.h (_GCC_CXX_POINTER_COMPARISON_OPERATION_SET): + Same. + + * testsuite/17_intro/headers/all.cc: Move into dialect-specific + directory. + * testsuite/17_intro/headers/all_pedantic_errors.cc: Same. + * testsuite/17_intro/headers/all_assert_neg.cc: Same. + * testsuite/17_intro/headers/all_c++200x_compatibility.cc: Same. + + * testsuite/17_intro/headers/c++1998/all.cc: Use extc++.h include. + * testsuite/17_intro/headers/c++1998/stdc++.cc: Converted all.cc, + use stdc++.h include. + * testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc: Same. + * testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc: Same. + * testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc: Same. + * testsuite/17_intro/headers/c++1998/all_no_exceptions.cc: New. + * testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc: To... + * testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc + ...this. + * testsuite/17_intro/headers/c++200x/all.cc: To... + * testsuite/17_intro/headers/c++200x/stdc++.cc: ..this. + * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: To... + * testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc: + ...this. + * testsuite/17_intro/headers/c++200x/all_no_exceptions.cc: New. + * testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc: New. + 2009-08-10 Benjamin Kosnik <bkoz@redhat.com> * include/std/future: Move error handling bits outside macro guard. diff --git a/libstdc++-v3/include/ext/cast.h b/libstdc++-v3/include/ext/cast.h index 3ffad7c2775..8fd8cc9c47e 100644 --- a/libstdc++-v3/include/ext/cast.h +++ b/libstdc++-v3/include/ext/cast.h @@ -25,7 +25,7 @@ #ifndef _CAST_H #define _CAST_H 1 -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx); +_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * These functions are here to allow containers to support non standard diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h index 5aac7f178fa..36209d3e632 100644 --- a/libstdc++-v3/include/ext/pointer.h +++ b/libstdc++-v3/include/ext/pointer.h @@ -478,12 +478,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // End GCC_CXX_POINTER_COMPARISON_OPERATION_SET Macro // Expand into the various comparison operators needed. - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(==,); - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(!=,); - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<,); - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<=,); - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>,); - _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>=,); + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(==,) + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(!=,) + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<,) + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<=,) + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>,) + _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>=,) // These are here for expressions like "ptr == 0", "ptr != 0" template<typename _Tp> diff --git a/libstdc++-v3/include/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h index f0ccc42f0ca..03e53390cd1 100644 --- a/libstdc++-v3/include/precompiled/extc++.h +++ b/libstdc++-v3/include/precompiled/extc++.h @@ -26,7 +26,9 @@ * This is an implementation file for a precompiled header. */ +#ifndef __GXX_EXPERIMENTAL_CXX0X__ #include <bits/stdtr1c++.h> +#endif #include <ext/algorithm> #include <ext/array_allocator.h> diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h index 6cae9e5e96d..1c615091bdc 100644 --- a/libstdc++-v3/include/precompiled/stdc++.h +++ b/libstdc++-v3/include/precompiled/stdc++.h @@ -30,7 +30,9 @@ // 17.4.1.2 Headers // C +#ifndef _GLIBCXX_NO_ASSERT #include <cassert> +#endif #include <cctype> #include <cerrno> #include <cfloat> diff --git a/libstdc++-v3/testsuite/17_intro/headers/all.cc b/libstdc++-v3/testsuite/17_intro/headers/all.cc deleted file mode 100644 index d6898235c4a..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/all.cc +++ /dev/null @@ -1,138 +0,0 @@ -// { dg-do compile } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> - -// C++ -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - -// TR1 -#include <tr1/array> -#include <tr1/cctype> -#include <tr1/cfenv> -#include <tr1/cfloat> -#include <tr1/cinttypes> -#include <tr1/climits> -#include <tr1/cmath> -#include <tr1/complex> -#include <tr1/cstdarg> -#include <tr1/cstdbool> -#include <tr1/cstdint> -#include <tr1/cstdio> -#include <tr1/cstdlib> -#include <tr1/ctgmath> -#include <tr1/ctime> -#include <tr1/cwchar> -#include <tr1/cwctype> -#include <tr1/functional> -#include <tr1/random> -#include <tr1/tuple> -#include <tr1/unordered_map> -#include <tr1/unordered_set> -#include <tr1/utility> - -// Extensions -#include <ext/algorithm> -#include <ext/array_allocator.h> -#include <ext/atomicity.h> -#include <ext/bitmap_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/codecvt_specializations.h> -#endif -#include <ext/concurrence.h> -#include <ext/debug_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/enc_filebuf.h> -#endif -#include <ext/functional> -#include <ext/iterator> -#include <ext/malloc_allocator.h> -#include <ext/memory> -#include <ext/mt_allocator.h> -#include <ext/new_allocator.h> -#include <ext/numeric> -#include <ext/pod_char_traits.h> -#include <ext/pool_allocator.h> -#include <ext/rb_tree> -#include <ext/rope> -#include <ext/slist> -#include <ext/stdio_filebuf.h> -#include <ext/stdio_sync_filebuf.h> -#include <ext/throw_allocator.h> -#include <ext/typelist.h> -#include <ext/type_traits.h> -#include <ext/vstring.h> -#include <ext/pb_ds/assoc_container.hpp> -#include <ext/pb_ds/priority_queue.hpp> -#include <ext/pb_ds/exception.hpp> -#include <ext/pb_ds/hash_policy.hpp> -#include <ext/pb_ds/list_update_policy.hpp> -#include <ext/pb_ds/tree_policy.hpp> -#include <ext/pb_ds/trie_policy.hpp> diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_assert_neg.cc b/libstdc++-v3/testsuite/17_intro/headers/all_assert_neg.cc deleted file mode 100644 index 9680ce03c4b..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/all_assert_neg.cc +++ /dev/null @@ -1,88 +0,0 @@ -// { dg-do compile } -// { dg-options "-D__GLIBCXX__=99999999" } -// NB: This is done to force any generated and possibly included PCH -// to be invalid. - -// 2005-05-24 bkoz - -// Copyright (C) 2005, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 17.4.1.2 Headers - -// This file tests that assert is not included in any of the standard -// includes by accident. - -// C++ headers -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - -// C headers -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> - -void foo() -{ - assert(true); -} - -// { dg-error "not declared" "" { target *-*-* } 83 } - - diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc b/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc deleted file mode 100644 index 843f9f7671d..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc +++ /dev/null @@ -1,139 +0,0 @@ -// { dg-do compile } -// { dg-options "-Wc++0x-compat -Werror" } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> - -// C++ -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - -// TR1 -#include <tr1/array> -#include <tr1/cctype> -#include <tr1/cfenv> -#include <tr1/cfloat> -#include <tr1/cinttypes> -#include <tr1/climits> -#include <tr1/cmath> -#include <tr1/complex> -#include <tr1/cstdarg> -#include <tr1/cstdbool> -#include <tr1/cstdint> -#include <tr1/cstdio> -#include <tr1/cstdlib> -#include <tr1/ctgmath> -#include <tr1/ctime> -#include <tr1/cwchar> -#include <tr1/cwctype> -#include <tr1/functional> -#include <tr1/random> -#include <tr1/tuple> -#include <tr1/unordered_map> -#include <tr1/unordered_set> -#include <tr1/utility> - -// Extensions -#include <ext/algorithm> -#include <ext/array_allocator.h> -#include <ext/atomicity.h> -#include <ext/bitmap_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/codecvt_specializations.h> -#endif -#include <ext/concurrence.h> -#include <ext/debug_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/enc_filebuf.h> -#endif -#include <ext/functional> -#include <ext/iterator> -#include <ext/malloc_allocator.h> -#include <ext/memory> -#include <ext/mt_allocator.h> -#include <ext/new_allocator.h> -#include <ext/numeric> -#include <ext/pod_char_traits.h> -#include <ext/pool_allocator.h> -#include <ext/rb_tree> -#include <ext/rope> -#include <ext/slist> -#include <ext/stdio_filebuf.h> -#include <ext/stdio_sync_filebuf.h> -#include <ext/throw_allocator.h> -#include <ext/typelist.h> -#include <ext/type_traits.h> -#include <ext/vstring.h> -#include <ext/pb_ds/assoc_container.hpp> -#include <ext/pb_ds/priority_queue.hpp> -#include <ext/pb_ds/exception.hpp> -#include <ext/pb_ds/hash_policy.hpp> -#include <ext/pb_ds/list_update_policy.hpp> -#include <ext/pb_ds/tree_policy.hpp> -#include <ext/pb_ds/trie_policy.hpp> diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc deleted file mode 100644 index 6e94152cd52..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc +++ /dev/null @@ -1,139 +0,0 @@ -// { dg-do compile } -// { dg-options "-pedantic-errors" } - -// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> - -// C++ -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - -// TR1 -#include <tr1/array> -#include <tr1/cctype> -#include <tr1/cfenv> -#include <tr1/cfloat> -#include <tr1/cinttypes> -#include <tr1/climits> -#include <tr1/cmath> -#include <tr1/complex> -#include <tr1/cstdarg> -#include <tr1/cstdbool> -#include <tr1/cstdint> -#include <tr1/cstdio> -#include <tr1/cstdlib> -#include <tr1/ctgmath> -#include <tr1/ctime> -#include <tr1/cwchar> -#include <tr1/cwctype> -#include <tr1/functional> -#include <tr1/random> -#include <tr1/tuple> -#include <tr1/unordered_map> -#include <tr1/unordered_set> -#include <tr1/utility> - -// Extensions -#include <ext/algorithm> -#include <ext/array_allocator.h> -#include <ext/atomicity.h> -#include <ext/bitmap_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/codecvt_specializations.h> -#endif -#include <ext/concurrence.h> -#include <ext/debug_allocator.h> -#if _GLIBCXX_HAVE_ICONV -#include <ext/enc_filebuf.h> -#endif -#include <ext/functional> -#include <ext/iterator> -#include <ext/malloc_allocator.h> -#include <ext/memory> -#include <ext/mt_allocator.h> -#include <ext/new_allocator.h> -#include <ext/numeric> -#include <ext/pod_char_traits.h> -#include <ext/pool_allocator.h> -#include <ext/rb_tree> -#include <ext/rope> -#include <ext/slist> -#include <ext/stdio_filebuf.h> -#include <ext/stdio_sync_filebuf.h> -#include <ext/throw_allocator.h> -#include <ext/typelist.h> -#include <ext/type_traits.h> -#include <ext/vstring.h> -#include <ext/pb_ds/assoc_container.hpp> -#include <ext/pb_ds/priority_queue.hpp> -#include <ext/pb_ds/exception.hpp> -#include <ext/pb_ds/hash_policy.hpp> -#include <ext/pb_ds/list_update_policy.hpp> -#include <ext/pb_ds/tree_policy.hpp> -#include <ext/pb_ds/trie_policy.hpp> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc index ce7c50e1c61..70661e91376 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc @@ -1,7 +1,6 @@ // { dg-do compile } -// 1999-05-12 bkoz -// Copyright (C) 1999, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2009 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 @@ -18,86 +17,4 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// FreeBSD wants warning clean system headers: -// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } - -// 17.4.1.2 Headers - -// "C" headers -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> -#include <cwchar> -#include <cwctype> - -// "C" compatibility headers -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <float.h> -#include <iso646.h> -#include <limits.h> -#include <locale.h> -#include <math.h> -#include <setjmp.h> -#include <signal.h> -#include <stdarg.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include <wchar.h> -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include <wctype.h> -#endif - -// "C++" headers -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc new file mode 100644 index 00000000000..40889d932ad --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc @@ -0,0 +1,24 @@ +// { dg-do compile } +// { dg-options "-Wc++0x-compat -Werror" } + +// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// Make sure all the includes can be compiled with -Wc++0x-compat +// libstdc++/30571 + +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc deleted file mode 100644 index f7904aea8e9..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc +++ /dev/null @@ -1,181 +0,0 @@ -// { dg-do compile } -// 1999-05-12 bkoz - -// Copyright (C) 1999, 2007, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// FreeBSD wants warning clean system headers: -// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } - -// 17.4.1.2 Headers - -// "C" headers -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> -#include <cwchar> -#include <cwctype> - -// "C" compatibility headers -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <float.h> -#include <iso646.h> -#include <limits.h> -#include <locale.h> -#include <math.h> -#include <setjmp.h> -#include <signal.h> -#include <stdarg.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include <wchar.h> -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include <wctype.h> -#endif - -// "C++" headers -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> - - -// "C" headers -#include <cassert> -#include <cctype> -#include <cerrno> -#include <cfloat> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctime> -#include <cwchar> -#include <cwctype> - -// "C" compatibility headers -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <float.h> -#include <iso646.h> -#include <limits.h> -#include <locale.h> -#include <math.h> -#include <setjmp.h> -#include <signal.h> -#include <stdarg.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include <wchar.h> -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include <wctype.h> -#endif - -// "C++" headers -#include <algorithm> -#include <bitset> -#include <complex> -#include <deque> -#include <exception> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <typeinfo> -#include <utility> -#include <valarray> -#include <vector> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_exceptions.cc new file mode 100644 index 00000000000..c645d3f7dbc --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_exceptions.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-fno-exceptions" } + +// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc new file mode 100644 index 00000000000..4faa5af3ddf --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-pedantic-errors" } + +// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc new file mode 100644 index 00000000000..3d5db7a3227 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc @@ -0,0 +1,49 @@ +// FreeBSD wants warning clean system headers: +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } +// { dg-do compile } +// 1999-05-12 bkoz + +// Copyright (C) 1999, 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// 17.4.1.2 Headers + +#include <bits/stdc++.h> + +// "C" compatibility headers +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <float.h> +#include <iso646.h> +#include <limits.h> +#include <locale.h> +#include <math.h> +#include <setjmp.h> +#include <signal.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include <wchar.h> +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include <wctype.h> +#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc new file mode 100644 index 00000000000..829dee1a22b --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc @@ -0,0 +1,35 @@ +// { dg-do compile } +// { dg-options "-D_GLIBCXX_NO_ASSERT" } +// NB: This is done to force any generated and possibly included PCH +// to be invalid, and also to remove cassert from the include set. + +// 2005-05-24 bkoz + +// Copyright (C) 2005, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// 17.4.1.2 Headers + +// This file tests that assert is not included in any of the standard +// includes by accident. + +#include <bits/stdc++.h> + +void foo() +{ + assert(true); // { dg-error "not declared" "" { target *-*-* } } +} diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc new file mode 100644 index 00000000000..e900fa75ef3 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc @@ -0,0 +1,75 @@ +// FreeBSD wants warning clean system headers: +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } +// { dg-do compile } +// 1999-05-12 bkoz + +// Copyright (C) 1999, 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// 17.4.1.2 Headers + +#include <bits/stdc++.h> + +// "C" compatibility headers +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <float.h> +#include <iso646.h> +#include <limits.h> +#include <locale.h> +#include <math.h> +#include <setjmp.h> +#include <signal.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include <wchar.h> +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include <wctype.h> +#endif + +#include <bits/stdc++.h> + +// "C" compatibility headers +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <float.h> +#include <iso646.h> +#include <limits.h> +#include <locale.h> +#include <math.h> +#include <setjmp.h> +#include <signal.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include <wchar.h> +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include <wctype.h> +#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc deleted file mode 100644 index 424bb58a882..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc +++ /dev/null @@ -1,252 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see -// <http://www.gnu.org/licenses/>. - -// 17.4.1.2 Headers - -// "C" headers -#include <cassert> -#include <ccomplex> -#include <cctype> -#include <cerrno> -#include <cfenv> -#include <cfloat> -#include <cinttypes> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstdbool> -#include <cstddef> -#include <cstdint> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctgmath> -#include <ctime> -#include <cwchar> -#include <cwctype> - -// "C" compatibility headers -#include <assert.h> -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include <complex.h> -#endif -#include <ctype.h> -#include <errno.h> -#ifdef _GLIBCXX_HAVE_FENV_H -#include <fenv.h> -#endif -#include <float.h> -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include <inttypes.h> -#endif -#include <iso646.h> -#include <limits.h> -#include <locale.h> -#include <math.h> -#include <setjmp.h> -#include <signal.h> -#include <stdarg.h> -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include <stdbool.h> -#endif -#include <stddef.h> -#ifdef _GLIBCXX_HAVE_STDINT_H -#include <stdint.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include <tgmath.h> -#endif -#include <time.h> -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include <wchar.h> -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include <wctype.h> -#endif - -// "C++" headers -#include <algorithm> -#include <array> -#include <bitset> -#include <chrono> -#include <complex> -#include <condition_variable> -#include <deque> -#include <exception> -#include <forward_list> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <mutex> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <random> -#include <ratio> -#include <regex> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <thread> -#include <tuple> -#include <typeinfo> -#include <type_traits> -#include <unordered_map> -#include <unordered_set> -#include <utility> -#include <valarray> -#include <vector> - - -// "C" headers -#include <cassert> -#include <ccomplex> -#include <cctype> -#include <cerrno> -#include <cfenv> -#include <cfloat> -#include <cinttypes> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstdbool> -#include <cstddef> -#include <cstdint> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctgmath> -#include <ctime> -#include <cwchar> -#include <cwctype> - -// "C" compatibility headers -#include <assert.h> -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include <complex.h> -#endif -#include <ctype.h> -#include <errno.h> -#ifdef _GLIBCXX_HAVE_FENV_H -#include <fenv.h> -#endif -#include <float.h> -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include <inttypes.h> -#endif -#include <iso646.h> -#include <limits.h> -#include <locale.h> -#include <math.h> -#include <setjmp.h> -#include <signal.h> -#include <stdarg.h> -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include <stdbool.h> -#endif -#include <stddef.h> -#ifdef _GLIBCXX_HAVE_STDINT_H -#include <stdint.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include <tgmath.h> -#endif -#include <time.h> -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include <wchar.h> -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include <wctype.h> -#endif - -// "C++" headers -#include <algorithm> -#include <array> -#include <bitset> -#include <chrono> -#include <complex> -#include <condition_variable> -#include <deque> -#include <exception> -#include <forward_list> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <mutex> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <random> -#include <ratio> -#include <regex> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <thread> -#include <tuple> -#include <typeinfo> -#include <type_traits> -#include <unordered_map> -#include <unordered_set> -#include <utility> -#include <valarray> -#include <vector> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc new file mode 100644 index 00000000000..5650e3a51ad --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x -fno-exceptions" } + +// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc new file mode 100644 index 00000000000..08f8fd80767 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x -pedantic-errors" } + +// Copyright (C) 2007, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <bits/extc++.h> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc index 5a9f8045ca4..f3e19f5003b 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc @@ -1,3 +1,5 @@ +// FreeBSD wants warning clean system headers: +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } // { dg-options "-std=gnu++0x" } // { dg-do compile } @@ -20,32 +22,7 @@ // 17.4.1.2 Headers -// "C" headers -#include <cassert> -#include <ccomplex> -#include <cctype> -#include <cerrno> -#include <cfenv> -#include <cfloat> -#include <cinttypes> -#include <ciso646> -#include <climits> -#include <clocale> -#include <cmath> -#include <csetjmp> -#include <csignal> -#include <cstdarg> -#include <cstdatomic> -#include <cstdbool> -#include <cstddef> -#include <cstdint> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <ctgmath> -#include <ctime> -#include <cwchar> -#include <cwctype> +#include <bits/stdc++.h> // "C" compatibility headers #include <assert.h> @@ -89,51 +66,3 @@ #ifdef _GLIBCXX_HAVE_WCTYPE_H #include <wctype.h> #endif - -// "C++" headers -#include <algorithm> -#include <array> -#include <bitset> -#include <chrono> -#include <complex> -#include <condition_variable> -#include <deque> -#include <exception> -#include <forward_list> -#include <fstream> -#include <functional> -#include <iomanip> -#include <ios> -#include <iosfwd> -#include <iostream> -#include <istream> -#include <iterator> -#include <limits> -#include <list> -#include <locale> -#include <map> -#include <memory> -#include <mutex> -#include <new> -#include <numeric> -#include <ostream> -#include <queue> -#include <random> -#include <ratio> -#include <regex> -#include <set> -#include <sstream> -#include <stack> -#include <stdexcept> -#include <streambuf> -#include <string> -#include <system_error> -#include <thread> -#include <tuple> -#include <typeinfo> -#include <type_traits> -#include <unordered_map> -#include <unordered_set> -#include <utility> -#include <valarray> -#include <vector> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc new file mode 100644 index 00000000000..89c6cdd43a0 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc @@ -0,0 +1,111 @@ +// FreeBSD wants warning clean system headers: +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2007, 2008, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// 17.4.1.2 Headers + +#include <bits/stdc++.h> + +// "C" compatibility headers +#include <assert.h> +#ifdef _GLIBCXX_HAVE_COMPLEX_H +#include <complex.h> +#endif +#include <ctype.h> +#include <errno.h> +#ifdef _GLIBCXX_HAVE_FENV_H +#include <fenv.h> +#endif +#include <float.h> +#ifdef _GLIBCXX_HAVE_INTTYPES_H +#include <inttypes.h> +#endif +#include <iso646.h> +#include <limits.h> +#include <locale.h> +#include <math.h> +#include <setjmp.h> +#include <signal.h> +#include <stdarg.h> +#ifdef _GLIBCXX_HAVE_STDBOOL_H +#include <stdbool.h> +#endif +#include <stddef.h> +#ifdef _GLIBCXX_HAVE_STDINT_H +#include <stdint.h> +#endif +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#ifdef _GLIBCXX_HAVE_TGMATH_H +#include <tgmath.h> +#endif +#include <time.h> +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include <wchar.h> +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include <wctype.h> +#endif + +#include <bits/stdc++.h> + +// "C" compatibility headers +#include <assert.h> +#ifdef _GLIBCXX_HAVE_COMPLEX_H +#include <complex.h> +#endif +#include <ctype.h> +#include <errno.h> +#ifdef _GLIBCXX_HAVE_FENV_H +#include <fenv.h> +#endif +#include <float.h> +#ifdef _GLIBCXX_HAVE_INTTYPES_H +#include <inttypes.h> +#endif +#include <iso646.h> +#include <limits.h> +#include <locale.h> +#include <math.h> +#include <setjmp.h> +#include <signal.h> +#include <stdarg.h> +#ifdef _GLIBCXX_HAVE_STDBOOL_H +#include <stdbool.h> +#endif +#include <stddef.h> +#ifdef _GLIBCXX_HAVE_STDINT_H +#include <stdint.h> +#endif +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#ifdef _GLIBCXX_HAVE_TGMATH_H +#include <tgmath.h> +#endif +#include <time.h> +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include <wchar.h> +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include <wctype.h> +#endif |