From: Benjamin Kosnik Date: Wed, 12 Aug 2009 00:56:12 +0000 (+0000) Subject: extc++.h: Don't include TR1 if C++0x. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12d74f0d0d7a9697ba2f446c5efe2dd8cd6c0bc6;p=gcc.git extc++.h: Don't include TR1 if C++0x. 2009-08-11 Benjamin Kosnik * 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. From-SVN: r150672 --- 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 + + * 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 * 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 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 +#endif #include #include 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 +#endif #include #include #include 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 -// . - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// C++ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// TR1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Extensions -#include -#include -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 -// . - -// 17.4.1.2 Headers - -// This file tests that assert is not included in any of the standard -// includes by accident. - -// C++ headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// C headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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 -// . - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// C++ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// TR1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Extensions -#include -#include -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 -// . - - -// Make sure all the includes can be compiled with -Wc++0x-compat -// libstdc++/30571 - -// C -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// C++ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// TR1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Extensions -#include -#include -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#if _GLIBCXX_HAVE_ICONV -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 // . -// FreeBSD wants warning clean system headers: -// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } - -// 17.4.1.2 Headers - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include 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 +// . + +// Make sure all the includes can be compiled with -Wc++0x-compat +// libstdc++/30571 + +#include 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 -// . - -// FreeBSD wants warning clean system headers: -// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } } - -// 17.4.1.2 Headers - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 +// . + +#include 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 +// . + +#include 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 +// . + +// 17.4.1.2 Headers + +#include + +// "C" compatibility headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#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 +// . + +// 17.4.1.2 Headers + +// This file tests that assert is not included in any of the standard +// includes by accident. + +#include + +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 +// . + +// 17.4.1.2 Headers + +#include + +// "C" compatibility headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#endif + +#include + +// "C" compatibility headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc deleted file mode 100644 index 5a9f8045ca4..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc +++ /dev/null @@ -1,139 +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 -// . - -// 17.4.1.2 Headers - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 -// . - -// 17.4.1.2 Headers - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 +// . + +#include 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 +// . + +#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc new file mode 100644 index 00000000000..f3e19f5003b --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc @@ -0,0 +1,68 @@ +// 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 +// . + +// 17.4.1.2 Headers + +#include + +// "C" compatibility headers +#include +#ifdef _GLIBCXX_HAVE_COMPLEX_H +#include +#endif +#include +#include +#ifdef _GLIBCXX_HAVE_FENV_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_INTTYPES_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_STDBOOL_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_STDINT_H +#include +#endif +#include +#include +#include +#ifdef _GLIBCXX_HAVE_TGMATH_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#endif 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 +// . + +// 17.4.1.2 Headers + +#include + +// "C" compatibility headers +#include +#ifdef _GLIBCXX_HAVE_COMPLEX_H +#include +#endif +#include +#include +#ifdef _GLIBCXX_HAVE_FENV_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_INTTYPES_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_STDBOOL_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_STDINT_H +#include +#endif +#include +#include +#include +#ifdef _GLIBCXX_HAVE_TGMATH_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#endif + +#include + +// "C" compatibility headers +#include +#ifdef _GLIBCXX_HAVE_COMPLEX_H +#include +#endif +#include +#include +#ifdef _GLIBCXX_HAVE_FENV_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_INTTYPES_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#ifdef _GLIBCXX_HAVE_STDBOOL_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_STDINT_H +#include +#endif +#include +#include +#include +#ifdef _GLIBCXX_HAVE_TGMATH_H +#include +#endif +#include +#ifdef _GLIBCXX_HAVE_WCHAR_H +#include +#endif +#ifdef _GLIBCXX_HAVE_WCTYPE_H +#include +#endif