For ISO C++11
diff --git a/libstdc++-v3/doc/html/manual/using_headers.html b/libstdc++-v3/doc/html/manual/using_headers.html
index 7e4d5be9136..bb147944ad9 100644
--- a/libstdc++-v3/doc/html/manual/using_headers.html
+++ b/libstdc++-v3/doc/html/manual/using_headers.html
@@ -74,12 +74,15 @@ of std::sinf, std::sin,
and std::sinl.
Precompiled Headers
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.
stdc++.h
Includes all standard headers. Actual content varies depending on
-language dialect.
+language dialect.
stdtr1c++.h
Includes all of <stdc++.h>, and adds all the TR1 headers.
-
extc++.h
Includes all of <stdtr1c++.h>, and adds all the Extension headers.
-
How to construct a .gch file from one of these base header files.
First, find the include directory for the compiler. One way to do
+
extc++.h
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>).
+
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:
g++ -v hello.cc
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index bad49f20c61..2c8d179b489 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -16,7 +16,8 @@
The standard library conforms to the dialect of C++ specified by the
option passed to the compiler.
By default, g++ is equivalent to
- g++ -std=gnu++98.
+ g++ -std=gnu++14 since GCC 6, and
+ g++ -std=gnu++98 for older releases.
@@ -718,7 +719,7 @@ and std::sinl.
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.
@@ -726,7 +727,7 @@ files that may the be used to speed compiles that use these headers.
stdc++.hIncludes all standard headers. Actual content varies depending on
-language dialect.
+language dialect.
@@ -737,13 +738,14 @@ language dialect.
extc++.h
-Includes all of <stdtr1c++.h>, and adds all the Extension headers.
+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>).
-How to construct a .gch file from one of these base header files.
-
-First, find the include directory for the compiler. One way to do
+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:
diff --git a/libstdc++-v3/include/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h
index de3775b36f5..8883e47fb0c 100644
--- a/libstdc++-v3/include/precompiled/extc++.h
+++ b/libstdc++-v3/include/precompiled/extc++.h
@@ -28,15 +28,25 @@
#if __cplusplus < 201103L
#include
+#else
+#include
#endif
#include
+#if __cplusplus >= 201103L
+# include
+#endif
+#include
#include
#include
#include
#include
+#if __cplusplus >= 201103L
+# include
+#endif
#include
#include
+#include
#include
#include
#include
@@ -45,9 +55,13 @@
#include
#include
#include
+#include
#include
#include
#include
+#if __cplusplus >= 201103L
+# include
+#endif
#include
#include
#include
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
index 7bc7ffe868c..20107d2cccf 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -35,7 +35,6 @@
#define unused 1
#endif
-#include // TODO: this is missing from
#include
int
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/42319.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/42319.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/67309.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/67309.cc
similarity index 92%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/67309.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/67309.cc
index 97df10f649f..409b38da59f 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/67309.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/67309.cc
@@ -19,5 +19,4 @@
// { dg-do compile }
// libstdc++/67309
-#include // TODO: this is missing from
#include
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
similarity index 94%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
index ae15f31b11c..8c3d0078576 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
@@ -34,7 +34,6 @@
#define unused 1
#endif
-#include // TODO: this is missing from
#include
int
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_exceptions.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/all_no_rtti.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/all_pedantic_errors.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/operator_names.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc
similarity index 100%
rename from libstdc++-v3/testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc
rename to libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index c482fbd9c4d..c395e1dab75 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -34,8 +34,6 @@
#define unused 1
#endif
-#include // TODO: this is missing from
-#include // TODO: this is missing from
#include
int
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc
new file mode 100644
index 00000000000..b5157c8af0b
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc
@@ -0,0 +1,21 @@
+// { 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
+// .
+
+#include
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc
new file mode 100644
index 00000000000..8b9fec7b3cf
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc
@@ -0,0 +1,21 @@
+// { 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
+// .
+
+#include
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc
new file mode 100644
index 00000000000..742315d82df
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc
@@ -0,0 +1,21 @@
+// { 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
+// .
+
+#include
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc
new file mode 100644
index 00000000000..c347368954c
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc
@@ -0,0 +1,30 @@
+// { 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
+// .
+
+// libstdc++/47662
+
+// Avoid using PCH
+#include
+#include
+#include
+#include
+
+int or, xor, and;
+
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc
new file mode 100644
index 00000000000..0528b33a64d
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc
@@ -0,0 +1,70 @@
+// 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
+// .
+
+// 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
+#if __has_include()
+#include
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include
+#endif
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc
new file mode 100644
index 00000000000..67b51cee95c
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc
@@ -0,0 +1,117 @@
+// 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
+// .
+
+// 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
+#if __has_include()
+#include
+#endif
+#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
+#if __has_include()
+#include
+#endif
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+#include
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+#include
+#endif
--
2.30.2