From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- libstdc++-v3/testsuite/17_intro/freestanding.cc | 50 ++++++++++ .../testsuite/17_intro/headers/c++1998/all.cc | 20 ++++ .../headers/c++1998/all_c++200x_compatibility.cc | 24 +++++ .../17_intro/headers/c++1998/all_no_exceptions.cc | 21 ++++ .../17_intro/headers/c++1998/all_no_rtti.cc | 21 ++++ .../headers/c++1998/all_pedantic_errors.cc | 21 ++++ .../17_intro/headers/c++1998/operator_names.cc | 30 ++++++ .../testsuite/17_intro/headers/c++1998/stdc++.cc | 49 +++++++++ .../17_intro/headers/c++1998/stdc++_assert_neg.cc | 35 +++++++ .../headers/c++1998/stdc++_multiple_inclusion.cc | 75 ++++++++++++++ .../testsuite/17_intro/headers/c++200x/42319.cc | 22 ++++ .../17_intro/headers/c++200x/all_no_exceptions.cc | 21 ++++ .../17_intro/headers/c++200x/all_no_rtti.cc | 21 ++++ .../headers/c++200x/all_pedantic_errors.cc | 21 ++++ .../17_intro/headers/c++200x/operator_names.cc | 30 ++++++ .../testsuite/17_intro/headers/c++200x/stdc++.cc | 67 +++++++++++++ .../headers/c++200x/stdc++_multiple_inclusion.cc | 111 +++++++++++++++++++++ .../testsuite/17_intro/using_namespace_std.cc | 25 +++++ .../17_intro/using_namespace_std_tr1_neg.cc | 69 +++++++++++++ 19 files changed, 733 insertions(+) create mode 100644 libstdc++-v3/testsuite/17_intro/freestanding.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/all_c++200x_compatibility.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_exceptions.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_rtti.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/all_pedantic_errors.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/operator_names.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/42319.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_rtti.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/operator_names.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc create mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc create mode 100644 libstdc++-v3/testsuite/17_intro/using_namespace_std.cc create mode 100644 libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc (limited to 'libstdc++-v3/testsuite/17_intro') diff --git a/libstdc++-v3/testsuite/17_intro/freestanding.cc b/libstdc++-v3/testsuite/17_intro/freestanding.cc new file mode 100644 index 000000000..52aa965f9 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/freestanding.cc @@ -0,0 +1,50 @@ +// { dg-options "-x c -std=gnu++0x -lsupc++" } + +// Copyright (C) 2010 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 +#include +#include + +#include +#include +#include +#include + +#include +#include + +int main() +{ + std::exception e; + + const char* str __attribute__((unused)) = typeid(e).name(); + + typedef std::numeric_limits limit_type; + limit_type limit_l __attribute__((unused)); + int r __attribute__((unused)) = limit_type::radix; + + const char* cp = new char; + delete cp; + + bool b __attribute__((unused)) = std::is_integral::value; + + std::initializer_list ilisti __attribute__((unused)); + + return 0; +} diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc new file mode 100644 index 000000000..70661e913 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc @@ -0,0 +1,20 @@ +// { 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 +// . + +#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 000000000..40889d932 --- /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_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_exceptions.cc new file mode 100644 index 000000000..c645d3f7d --- /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_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_rtti.cc new file mode 100644 index 000000000..99585999e --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_no_rtti.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-fno-rtti" } + +// Copyright (C) 2010 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 000000000..4faa5af3d --- /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/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/operator_names.cc new file mode 100644 index 000000000..00e8bdaea --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/operator_names.cc @@ -0,0 +1,30 @@ +// { dg-do compile } +// { dg-options "-fno-operator-names" } + +// Copyright (C) 2011 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 +// . + +// libstdc++/47662 + +// Avoid using PCH +#include +#include +#include +#include + +int or, xor, and; + 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 000000000..3d5db7a32 --- /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 000000000..829dee1a2 --- /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 000000000..e900fa75e --- /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/42319.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/42319.cc new file mode 100644 index 000000000..729fca1cb --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/42319.cc @@ -0,0 +1,22 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// . + +// libstdc++/42319 +#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 000000000..5650e3a51 --- /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_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_rtti.cc new file mode 100644 index 000000000..2ce83ed0e --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_rtti.cc @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x -fno-rtti" } + +// Copyright (C) 2010 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 000000000..08f8fd807 --- /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/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/operator_names.cc new file mode 100644 index 000000000..9ad40f0f0 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/operator_names.cc @@ -0,0 +1,30 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x -fno-operator-names" } + +// Copyright (C) 2011 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 +// . + +// libstdc++/47662 + +// Avoid using PCH +#include +#include +#include +#include + +int or, xor, and; + 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 000000000..357373a0a --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc @@ -0,0 +1,67 @@ +// 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, 2010 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 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 000000000..89c6cdd43 --- /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 diff --git a/libstdc++-v3/testsuite/17_intro/using_namespace_std.cc b/libstdc++-v3/testsuite/17_intro/using_namespace_std.cc new file mode 100644 index 000000000..f03f95a0f --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/using_namespace_std.cc @@ -0,0 +1,25 @@ +// { 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 +// . + +#include + +namespace gnu +{ + using namespace std; +} diff --git a/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc new file mode 100644 index 000000000..7e27a320c --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc @@ -0,0 +1,69 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2007, 2008, 2009, 2010 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 +// . + +// NB: parallel-mode uses TR1 bits... +#undef _GLIBCXX_PARALLEL + +#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 + +namespace gnu +{ + using namespace std::tr1; // { dg-error "is not a namespace-name" } +} + +// { dg-error "expected namespace-name before" "" { target *-*-* } 66 } -- cgit v1.2.3