OSDN Git Service

2007-09-14 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Sep 2007 17:46:56 +0000 (17:46 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Sep 2007 17:46:56 +0000 (17:46 +0000)
        * 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128500 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
libstdc++-v3/include/parallel/partial_sum.h
libstdc++-v3/include/tr1/cstdbool
libstdc++-v3/include/tr1_impl/cfenv
libstdc++-v3/include/tr1_impl/cinttypes
libstdc++-v3/include/tr1_impl/cstdint
libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc [new file with mode: 0644]

index f378310..3dcfc21 100644 (file)
@@ -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.
index 909b171..422f253 100644 (file)
@@ -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);
index 4e43db3..5f6e80e 100644 (file)
@@ -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
index 01535e0..4a1eca9 100644 (file)
@@ -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>
index 05b5251..1762593 100644 (file)
@@ -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) 
index 862ee97..6df74c7 100644 (file)
@@ -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 (file)
index 0000000..1325cc9
--- /dev/null
@@ -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>