0801f41944
Since GCC 9, C++17 support is no longer experimental. It was too late to change the default C++ dialect to C++17 in GCC 10, but I think now it's time to pull the trigger (C++14 was made the default in GCC 6.1). We're still missing two C++17 library features, but that shouldn't stop us. See <https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017> and <https://gcc.gnu.org/projects/cxx-status.html#cxx17> for the C++17 status. I won't list all C++17 features here, but just a few heads-up: - trigraphs were removed (hardly anyone cares, unless your keyboard is missing the # key), - operator++(bool) was removed (so some tests now run in C++14 and down only), - the keyword register was removed (some legacy code might trip on this), - noexcept specification is now part of the type system and C++17 does not allow dynamic exception specifications anymore (the empty throw specification is still available, but it is deprecated), - the evaluation order rules are different in C++17, - static constexpr data members are now implicitly inline (which makes them definitions), - C++17 requires guaranteed copy elision, meaning that a copy/move constructor call might be elided completely. That means that if something relied on a constructor being instantiated via e.g. copying a function parameter, it might now fail. I'll post an update for cxx-status.html and add a new caveat to changes.html once this is in. gcc/ChangeLog: * doc/invoke.texi (C Dialect Options): Adjust -std default for C++. * doc/standards.texi (C Language): Correct the default dialect. (C++ Language): Update the default for C++ to gnu++17. gcc/c-family/ChangeLog: * c-opts.c (c_common_init_options): Default to gnu++17. gcc/testsuite/ChangeLog: * c-c++-common/torture/vector-subscript-3.c: In C++17, define away the keyword register. * g++.dg/cpp1z/attributes-enum-1a.C: Only run pre-C++17. * g++.dg/cpp1z/fold7a.C: Likewise. * g++.dg/cpp1z/nontype3a.C: Likewise. * g++.dg/cpp1z/utf8-2a.C: Likewise. * g++.dg/parse/error11.C: Update expected diagnostics for C++17. * g++.dg/torture/pr34850.C: Add -Wno-attribute-warning. * g++.dg/torture/pr49394.C: In C++17, use noexcept(false). * g++.dg/torture/pr82154.C: Use -std=c++14. * lib/target-supports.exp: Set to C++17. * obj-c++.dg/try-catch-9.mm: Use -Wno-register. libgomp/ChangeLog: * testsuite/libgomp.c++/atomic-3.C: Use -std=gnu++14. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.