diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2007-09-14 17:46:56 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2007-09-14 17:46:56 +0000 |
commit | c417817a8575731e1e10ddf063d25d9c4cdde12a (patch) | |
tree | 3034f05765a3ea09ca2ed16721c17c087ddae113 | |
parent | 5baa7f6f709fb3a7da9497a65edbe33bbc7498a0 (diff) | |
download | gcc-c417817a8575731e1e10ddf063d25d9c4cdde12a.zip gcc-c417817a8575731e1e10ddf063d25d9c4cdde12a.tar.gz gcc-c417817a8575731e1e10ddf063d25d9c4cdde12a.tar.bz2 |
all_pedantic_errors.cc: New.
2007-09-14 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/17_intro/headers/all_pedantic_errors.cc: New.
* include/tr1_impl/cinttypes: Add pragma GCC system_header.
* include/tr1_impl/cfenv: Same.
* include/tr1_impl/cstdint: Same.
* include/tr1/cstdbool: Same.
* include/ext/pb_ds/detail/resize_policy/
hash_prime_size_policy_imp.hpp: Same.
* include/parallel/partial_sum.h: Avoid VLA error with
__builtin_alloca.
From-SVN: r128500
-rw-r--r-- | libstdc++-v3/ChangeLog | 12 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/parallel/partial_sum.h | 3 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/cstdbool | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1_impl/cfenv | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1_impl/cinttypes | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1_impl/cstdint | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc | 146 |
8 files changed, 169 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f378310..3dcfc21 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2007-09-14 Benjamin Kosnik <bkoz@redhat.com> + + * testsuite/17_intro/headers/all_pedantic_errors.cc: New. + * include/tr1_impl/cinttypes: Add pragma GCC system_header. + * include/tr1_impl/cfenv: Same. + * include/tr1_impl/cstdint: Same. + * include/tr1/cstdbool: Same. + * include/ext/pb_ds/detail/resize_policy/ + hash_prime_size_policy_imp.hpp: Same. + * include/parallel/partial_sum.h: Avoid VLA error with + __builtin_alloca. + 2007-09-14 Thiemo Seufer <ths@mips.com> * crossconfig.m4 (mips*-sde-elf*): New stanza. diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp index 3328c91..97052ce 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp @@ -44,6 +44,8 @@ * Contains a resize size policy implementation. */ +#pragma GCC system_header + namespace detail { enum diff --git a/libstdc++-v3/include/parallel/partial_sum.h b/libstdc++-v3/include/parallel/partial_sum.h index 909b171..422f253 100644 --- a/libstdc++-v3/include/parallel/partial_sum.h +++ b/libstdc++-v3/include/parallel/partial_sum.h @@ -39,7 +39,6 @@ #ifndef _GLIBCXX_PARALLEL_PARTIAL_SUM_H #define _GLIBCXX_PARALLEL_PARTIAL_SUM_H 1 - #include <omp.h> #include <bits/stl_algobase.h> #include <parallel/parallel.h> @@ -104,7 +103,7 @@ namespace __gnu_parallel return parallel_partial_sum_basecase(begin + 1, end, result + 1, bin_op, *begin); } - difference_type borders[num_threads + 2]; + difference_type* borders = __builtin_alloca(sizeof(difference_type) * (num_threads + 2)); if (Settings::partial_sum_dilatation == 1.0f) equally_split(n, num_threads + 1, borders); diff --git a/libstdc++-v3/include/tr1/cstdbool b/libstdc++-v3/include/tr1/cstdbool index 4e43db3..5f6e80e 100644 --- a/libstdc++-v3/include/tr1/cstdbool +++ b/libstdc++-v3/include/tr1/cstdbool @@ -34,6 +34,8 @@ #ifndef _GLIBCXX_TR1_CSTDBOOL #define _GLIBCXX_TR1_CSTDBOOL 1 +#pragma GCC system_header + #include <bits/c++config.h> #if _GLIBCXX_HAVE_STDBOOL_H diff --git a/libstdc++-v3/include/tr1_impl/cfenv b/libstdc++-v3/include/tr1_impl/cfenv index 01535e0..4a1eca9 100644 --- a/libstdc++-v3/include/tr1_impl/cfenv +++ b/libstdc++-v3/include/tr1_impl/cfenv @@ -32,6 +32,8 @@ * You should not attempt to use it directly. */ +#pragma GCC system_header + #if _GLIBCXX_USE_C99_FENV_TR1 #include_next <fenv.h> diff --git a/libstdc++-v3/include/tr1_impl/cinttypes b/libstdc++-v3/include/tr1_impl/cinttypes index 05b5251..1762593 100644 --- a/libstdc++-v3/include/tr1_impl/cinttypes +++ b/libstdc++-v3/include/tr1_impl/cinttypes @@ -32,6 +32,8 @@ * You should not attempt to use it directly. */ +#pragma GCC system_header + #if _GLIBCXX_USE_C99_INTTYPES_TR1 // For 8.11.1/1 (see C99, Note 184) diff --git a/libstdc++-v3/include/tr1_impl/cstdint b/libstdc++-v3/include/tr1_impl/cstdint index 862ee97..6df74c7 100644 --- a/libstdc++-v3/include/tr1_impl/cstdint +++ b/libstdc++-v3/include/tr1_impl/cstdint @@ -32,6 +32,8 @@ * You should not attempt to use it directly. */ +#pragma GCC system_header + #if _GLIBCXX_USE_C99_STDINT_TR1 // For 8.22.1/1 (see C99, Notes 219, 220, 222) diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc new file mode 100644 index 0000000..1325cc9 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc @@ -0,0 +1,146 @@ +// { dg-do compile } +// { dg-options "-pedantic-errors" } + +// Copyright (C) 2007 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 2, 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 COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// 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> +#include <ext/codecvt_specializations.h> +#include <ext/concurrence.h> +#include <ext/debug_allocator.h> +#include <ext/enc_filebuf.h> +#include <ext/functional> +#include <ext/hash_map> +#include <ext/hash_set> +#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> |