[patch] libstdc++/64857 Rationalise PCH headers and 17_intro/headers tests.

Jonathan Wakely jwakely@redhat.com
Fri Sep 18 11:49:00 GMT 2015


On 11/09/15 13:25 +0100, Jonathan Wakely wrote:
>diff --git a/libstdc++-v3/include/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h
>index de3775b..8883e47 100644
>--- a/libstdc++-v3/include/precompiled/extc++.h
>+++ b/libstdc++-v3/include/precompiled/extc++.h
>@@ -28,15 +28,25 @@
> 
> #if __cplusplus < 201103L
> #include <bits/stdtr1c++.h>
>+#else
>+#include <bits/stdc++.h>
> #endif
> 
> #include <ext/algorithm>
>+#if __cplusplus >= 201103L
>+# include <ext/aligned_buffer.h>
>+#endif
>+#include <ext/alloc_traits.h>
> #include <ext/array_allocator.h>
> #include <ext/atomicity.h>
> #include <ext/bitmap_allocator.h>
> #include <ext/cast.h>
>+#if __cplusplus >= 201103L
>+# include <ext/cmath>
>+#endif
> #include <ext/concurrence.h>
> #include <ext/debug_allocator.h>
>+#include <ext/enc_filebuf.h>

Kai pointed out that <ext/enc_filebuf.h> is already included further
down, and guarded by _GLIBCXX_HAVE_ICONV, so doing it here breaks some
targets.

> #include <ext/extptr_allocator.h>
> #include <ext/functional>
> #include <ext/iterator>
>@@ -45,9 +55,13 @@
> #include <ext/mt_allocator.h>
> #include <ext/new_allocator.h>
> #include <ext/numeric>
>+#include <ext/numeric_traits.h>
> #include <ext/pod_char_traits.h>
> #include <ext/pointer.h>
> #include <ext/pool_allocator.h>
>+#if __cplusplus >= 201103L
>+# include <ext/random>
>+#endif

This breaks bootstrap on (at least) NetBSD 5.x because <ext/random>
uses UINT32_C. That fails due to https://gcc.gnu.org/PR65806 so I'm
checking for that macro in <ext/random> (and I also have a patch
coming to use GCC's own stdint.h on NetBSD 5).

Fixed by the attached patch.

Tested powerpc64le-linux and x86_64-netbsd5.1.

Committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150918/4b7fc643/attachment.bin>


More information about the Gcc-patches mailing list