2015-09-11 Jonathan Wakely <jwakely@redhat.com>
+ PR libstdc++/64857
+ * doc/xml/manual/using.xml: Improve aggregate header documentation.
+ * doc/html/manual/*: Regenerate.
+ * include/precompiled/extc++.h: Include <bits/stdc++.h> for C++11
+ and later and include more extension headers.
+ * testsuite/17_intro/headers/c++1998/all_attributes.cc: Remove
+ redundant header.
+ * testsuite/17_intro/headers/c++200x/: Rename to c++2011.
+ * testsuite/17_intro/headers/c++2014/all_attributes.cc: Remove
+ redundant headers.
+ * testsuite/17_intro/headers/c++2014/all_no_exceptions.cc: New.
+ * testsuite/17_intro/headers/c++2014/all_no_rtti.cc: New.
+ * testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc: New.
+ * testsuite/17_intro/headers/c++2014/operator_names.cc: New.
+ * testsuite/17_intro/headers/c++2014/stdc++.cc: New.
+ * testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc:
+ New.
+
PR libstdc++/58265
* doc/xml/manual/intro.xml: Document LWG 2063 and 2064 resolutions.
* doc/html/manual/bugs.html: Regenerate.
The standard library conforms to the dialect of C++ specified by the
<code class="option">-std</code> option passed to the compiler.
By default, <span class="command"><strong>g++</strong></span> is equivalent to
- <span class="command"><strong>g++ -std=gnu++98</strong></span>.
+ <span class="command"><strong>g++ -std=gnu++14</strong></span> since GCC 6, and
+ <span class="command"><strong>g++ -std=gnu++98</strong></span> for older releases.
</p><div class="table"><a id="table.cmd_options"></a><p class="title"><strong>Table 3.1. C++ Command Options</strong></p><div class="table-contents"><table summary="C++ Command Options" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th align="left">Option Flags</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><code class="literal">-std=c++98</code> or <code class="literal">-std=c++03</code>
</td><td align="left">Use the 1998 ISO C++ standard plus amendments.</td></tr><tr><td align="left"><code class="literal">-std=gnu++98</code> or <code class="literal">-std=gnu++03</code>
</td><td align="left">As directly above, with GNU extensions.</td></tr><tr><td align="left"><code class="literal">-std=c++11</code></td><td align="left">Use the 2011 ISO C++ standard.</td></tr><tr><td align="left"><code class="literal">-std=gnu++11</code></td><td align="left">As directly above, with GNU extensions.</td></tr><tr><td align="left"><code class="literal">-std=c++14</code></td><td align="left">Use the 2014 ISO C++ standard.</td></tr><tr><td align="left"><code class="literal">-std=gnu++14</code></td><td align="left">As directly above, with GNU extensions.</td></tr><tr><td align="left"><code class="literal">-fexceptions</code></td><td align="left">See <a class="link" href="using_exceptions.html#intro.using.exception.no" title="Doing without">exception-free dialect</a></td></tr><tr><td align="left"><code class="literal">-frtti</code></td><td align="left">As above, but RTTI-free dialect.</td></tr><tr><td align="left"><code class="literal">-pthread</code> or <code class="literal">-pthreads</code></td><td align="left">For ISO C++11
and <code class="code">std::sinl</code>.
</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.pre"></a>Precompiled Headers</h3></div></div></div><p>There are three base header files that are provided. They can be
used to precompile the standard headers and extensions into binary
-files that may the be used to speed compiles that use these headers.
+files that may then be used to speed up compilations that use these headers.
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>stdc++.h</p><p>Includes all standard headers. Actual content varies depending on
-language dialect.
+<a class="link" href="using.html#manual.intro.using.flags" title="Command Options">language dialect</a>.
</p></li><li class="listitem"><p>stdtr1c++.h</p><p>Includes all of <stdc++.h>, and adds all the TR1 headers.
-</p></li><li class="listitem"><p>extc++.h</p><p>Includes all of <stdtr1c++.h>, and adds all the Extension headers.
-</p></li></ul></div><p>How to construct a .gch file from one of these base header files.</p><p>First, find the include directory for the compiler. One way to do
+</p></li><li class="listitem"><p>extc++.h</p><p>Includes all of <stdc++.h>, and adds all the Extension headers
+(and in C++98 mode also adds all the TR1 headers by including all of
+<stdtr1c++.h>).
+</p></li></ul></div><p>To construct a .gch file from one of these base header files,
+first find the include directory for the compiler. One way to do
this is:</p><pre class="programlisting">
g++ -v hello.cc
The standard library conforms to the dialect of C++ specified by the
<option>-std</option> option passed to the compiler.
By default, <command>g++</command> is equivalent to
- <command>g++ -std=gnu++98</command>.
+ <command>g++ -std=gnu++14</command> since GCC 6, and
+ <command>g++ -std=gnu++98</command> for older releases.
</para>
<table frame="all" xml:id="table.cmd_options">
<para>There are three base header files that are provided. They can be
used to precompile the standard headers and extensions into binary
-files that may the be used to speed compiles that use these headers.
+files that may then be used to speed up compilations that use these headers.
</para>
<listitem>
<para>stdc++.h</para>
<para>Includes all standard headers. Actual content varies depending on
-language dialect.
+<link linkend="manual.intro.using.flags">language dialect</link>.
</para>
</listitem>
</listitem>
<listitem><para>extc++.h</para>
-<para>Includes all of <stdtr1c++.h>, and adds all the Extension headers.
+<para>Includes all of <stdc++.h>, and adds all the Extension headers
+(and in C++98 mode also adds all the TR1 headers by including all of
+<stdtr1c++.h>).
</para></listitem>
</itemizedlist>
-<para>How to construct a .gch file from one of these base header files.</para>
-
-<para>First, find the include directory for the compiler. One way to do
+<para>To construct a .gch file from one of these base header files,
+first find the include directory for the compiler. One way to do
this is:</para>
<programlisting>
#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>
#include <ext/extptr_allocator.h>
#include <ext/functional>
#include <ext/iterator>
#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
#include <ext/rb_tree>
#include <ext/rope>
#include <ext/slist>
#define unused 1
#endif
-#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
#include <bits/extc++.h>
int
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=gnu++11" }
-
-// Copyright (C) 2009-2015 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
-// <http://www.gnu.org/licenses/>.
-
-// libstdc++/42319
-#include <bits/char_traits.h>
+++ /dev/null
-// Copyright (C) 2015 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
-// <http://www.gnu.org/licenses/>.
-
-// { dg-options "-std=gnu++11 -fsingle-precision-constant" }
-// { dg-do compile }
-
-// libstdc++/67309
-#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
-#include <bits/extc++.h>
+++ /dev/null
-// Copyright (C) 2015 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
-// <http://www.gnu.org/licenses/>.
-
-// { dg-options "-std=gnu++11" }
-// { dg-do compile }
-
-// Ensure the library only uses the __name__ form for attributes.
-// Don't test 'const' and 'noreturn' because they are reserved anyway.
-#define abi_tag 1
-#define always_inline 1
-#ifndef __APPLE__
-// darwin headers use these, see PR 64883
-# define visibility 1
-# define deprecated 1
-#endif
-#define packed 1
-#define pure 1
-// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
-#ifndef __arm__
-#define unused 1
-#endif
-
-#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
-#include <bits/extc++.h>
-
-int
-main()
-{
-}
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=gnu++11 -fno-exceptions" }
-
-// Copyright (C) 2007-2015 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
-// <http://www.gnu.org/licenses/>.
-
-#include <bits/extc++.h>
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=gnu++11 -fno-rtti" }
-
-// Copyright (C) 2010-2015 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
-// <http://www.gnu.org/licenses/>.
-
-#include <bits/extc++.h>
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=gnu++11 -pedantic-errors" }
-
-// Copyright (C) 2007-2015 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
-// <http://www.gnu.org/licenses/>.
-
-#include <bits/extc++.h>
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=gnu++11 -fno-operator-names" }
-
-// Copyright (C) 2011-2015 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
-// <http://www.gnu.org/licenses/>.
-
-// libstdc++/47662
-
-// Avoid using PCH
-#include <cerrno>
-#include <bits/stdc++.h>
-#include <bits/stdtr1c++.h>
-#include <bits/extc++.h>
-
-int or, xor, and;
-
+++ /dev/null
-// FreeBSD wants warning clean system headers:
-// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
-// { dg-options "-std=gnu++11" }
-// { dg-do compile }
-
-// Copyright (C) 2007-2015 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
-// <http://www.gnu.org/licenses/>.
-
-// 17.4.1.2 Headers
-
-#include <bits/stdc++.h>
-
-// "C" compatibility headers
-#include <assert.h>
-#ifdef _GLIBCXX_HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#include <ctype.h>
-#include <errno.h>
-#ifdef _GLIBCXX_HAVE_FENV_H
-#include <fenv.h>
-#endif
-#include <float.h>
-#ifdef _GLIBCXX_HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#include <iso646.h>
-#include <limits.h>
-#include <locale.h>
-#include <math.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdarg.h>
-#ifdef _GLIBCXX_HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-#include <stddef.h>
-#ifdef _GLIBCXX_HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef _GLIBCXX_HAVE_TGMATH_H
-#include <tgmath.h>
-#endif
-#include <time.h>
-#if __has_include(<uchar.h>)
-#include <uchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
+++ /dev/null
-// FreeBSD wants warning clean system headers:
-// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
-// { dg-options "-std=gnu++11" }
-// { dg-do compile }
-
-// Copyright (C) 2007-2015 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
-// <http://www.gnu.org/licenses/>.
-
-// 17.4.1.2 Headers
-
-#include <bits/stdc++.h>
-
-// "C" compatibility headers
-#include <assert.h>
-#ifdef _GLIBCXX_HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#include <ctype.h>
-#include <errno.h>
-#ifdef _GLIBCXX_HAVE_FENV_H
-#include <fenv.h>
-#endif
-#include <float.h>
-#ifdef _GLIBCXX_HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#include <iso646.h>
-#include <limits.h>
-#include <locale.h>
-#include <math.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdarg.h>
-#ifdef _GLIBCXX_HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-#include <stddef.h>
-#ifdef _GLIBCXX_HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef _GLIBCXX_HAVE_TGMATH_H
-#include <tgmath.h>
-#endif
-#include <time.h>
-#if __has_include(<uchar.h>)
-#include <uchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
-
-#include <bits/stdc++.h>
-
-// "C" compatibility headers
-#include <assert.h>
-#ifdef _GLIBCXX_HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#include <ctype.h>
-#include <errno.h>
-#ifdef _GLIBCXX_HAVE_FENV_H
-#include <fenv.h>
-#endif
-#include <float.h>
-#ifdef _GLIBCXX_HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#include <iso646.h>
-#include <limits.h>
-#include <locale.h>
-#include <math.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdarg.h>
-#ifdef _GLIBCXX_HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-#include <stddef.h>
-#ifdef _GLIBCXX_HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef _GLIBCXX_HAVE_TGMATH_H
-#include <tgmath.h>
-#endif
-#include <time.h>
-#if __has_include(<uchar.h>)
-#include <uchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-#ifdef _GLIBCXX_HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2009-2015 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
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/42319
+#include <bits/char_traits.h>
--- /dev/null
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11 -fsingle-precision-constant" }
+// { dg-do compile }
+
+// libstdc++/67309
+#include <bits/extc++.h>
--- /dev/null
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Ensure the library only uses the __name__ form for attributes.
+// Don't test 'const' and 'noreturn' because they are reserved anyway.
+#define abi_tag 1
+#define always_inline 1
+#ifndef __APPLE__
+// darwin headers use these, see PR 64883
+# define visibility 1
+# define deprecated 1
+#endif
+#define packed 1
+#define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
+#define unused 1
+#endif
+
+#include <bits/extc++.h>
+
+int
+main()
+{
+}
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++11 -fno-exceptions" }
+
+// Copyright (C) 2007-2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++11 -fno-rtti" }
+
+// Copyright (C) 2010-2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++11 -pedantic-errors" }
+
+// Copyright (C) 2007-2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++11 -fno-operator-names" }
+
+// Copyright (C) 2011-2015 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
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/47662
+
+// Avoid using PCH
+#include <cerrno>
+#include <bits/stdc++.h>
+#include <bits/stdtr1c++.h>
+#include <bits/extc++.h>
+
+int or, xor, and;
+
--- /dev/null
+// FreeBSD wants warning clean system headers:
+// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2007-2015 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
+// <http://www.gnu.org/licenses/>.
+
+// 17.4.1.2 Headers
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
--- /dev/null
+// FreeBSD wants warning clean system headers:
+// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2007-2015 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
+// <http://www.gnu.org/licenses/>.
+
+// 17.4.1.2 Headers
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
#define unused 1
#endif
-#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
-#include <shared_mutex> // TODO: this is missing from <bits/stdc++.h>
#include <bits/extc++.h>
int
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++14 -fno-exceptions" }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++14 -fno-rtti" }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++14 -pedantic-errors" }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/extc++.h>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++14 -fno-operator-names" }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/47662
+
+// Avoid using PCH
+#include <cerrno>
+#include <bits/stdc++.h>
+#include <bits/stdtr1c++.h>
+#include <bits/extc++.h>
+
+int or, xor, and;
+
--- /dev/null
+// FreeBSD wants warning clean system headers:
+// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
+// { dg-options "-std=gnu++14" }
+// { dg-do compile }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+// 17.4.1.2 Headers
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
--- /dev/null
+// FreeBSD wants warning clean system headers:
+// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } }
+// { dg-options "-std=gnu++14" }
+// { dg-do compile }
+
+// Copyright (C) 2015 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
+// <http://www.gnu.org/licenses/>.
+
+// 17.4.1.2 Headers
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+#include <bits/stdc++.h>
+
+// "C" compatibility headers
+#include <assert.h>
+#ifdef _GLIBCXX_HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#ifdef _GLIBCXX_HAVE_FENV_H
+#include <fenv.h>
+#endif
+#include <float.h>
+#ifdef _GLIBCXX_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <iso646.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#ifdef _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+#include <stddef.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _GLIBCXX_HAVE_TGMATH_H
+#include <tgmath.h>
+#endif
+#include <time.h>
+#if __has_include(<uchar.h>)
+#include <uchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif