Index: libgomp/ChangeLog =================================================================== --- libgomp/ChangeLog (.../tags/gcc_7_2_0_release) +++ libgomp/ChangeLog (.../branches/gcc-7-branch) @@ -1,3 +1,47 @@ +2017-12-15 Jakub Jelinek + + Backported from mainline + 2017-11-24 Jakub Jelinek + + PR fortran/81304 + * testsuite/libgomp.fortran/pr81304.f90: New test. + + 2017-11-23 Jakub Jelinek + + PR fortran/81841 + * libgomp.fortran/pr81841.f90: New test. + +2017-12-10 Tom de Vries + + backport from trunk: + PR c/81875 + 2017-09-16 Tom de Vries + + * testsuite/libgomp.c/pr81875.c: New test. + +2017-09-15 Jakub Jelinek + + Backported from mainline + 2017-09-14 Jakub Jelinek + + PR c++/81314 + * testsuite/libgomp.c++/pr81314.C: New test. + +2017-09-07 Jakub Jelinek + + Backported from mainline + 2017-08-09 Jakub Jelinek + + PR c/81687 + * testsuite/libgomp.c/pr81687-1.c: New test. + * testsuite/libgomp.c/pr81687-2.c: New test. + + 2017-07-27 Jakub Jelinek + + PR c/45784 + * testsuite/libgomp.c/pr45784.c: New test. + * testsuite/libgomp.c++/pr45784.C: New test. + 2017-08-14 Release Manager * GCC 7.2.0 released. Index: libgomp/testsuite/libgomp.c++/pr81314.C =================================================================== --- libgomp/testsuite/libgomp.c++/pr81314.C (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c++/pr81314.C (.../branches/gcc-7-branch) @@ -0,0 +1,38 @@ +// PR c++/81314 +// { dg-do link } + +template +struct S { + S () { s = 0; } + S (const S &x) { s = x.s; } + ~S () {} + int s; +}; + +void +foo (S<2> &x) +{ + #pragma omp taskloop + for (int i = 0; i < 100; ++i) + x.s++; +} + +void +bar (S<3> &x) +{ + #pragma omp task + x.s++; +} + +int +main () +{ + S<2> s; + S<3> t; + #pragma omp parallel + #pragma omp master + { + foo (s); + bar (t); + } +} Index: libgomp/testsuite/libgomp.c++/pr45784.C =================================================================== --- libgomp/testsuite/libgomp.c++/pr45784.C (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c++/pr45784.C (.../branches/gcc-7-branch) @@ -0,0 +1,5 @@ +// PR c/45784 +// { dg-do run } + +#include "../libgomp.c/pr45784.c" + Index: libgomp/testsuite/libgomp.fortran/pr81304.f90 =================================================================== --- libgomp/testsuite/libgomp.fortran/pr81304.f90 (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.fortran/pr81304.f90 (.../branches/gcc-7-branch) @@ -0,0 +1,17 @@ +! PR fortran/81304 +! { dg-do run } +! { dg-options "-Wsurprising" } + +program pr81304 + integer :: i + real, dimension(1:3) :: a, b, c + a = 128 + b = 0 +!$omp parallel do reduction(min: a) reduction(max: b) private (c) ! { dg-bogus "Type specified for intrinsic function" } + do i = 1, 16 + c = (/ i, i - 5, i + 5 /) + a = min (a, c) + b = max (b, c) + end do + if (any (a /= (/ 1, -4, 6 /)) .or. any (b /= (/ 16, 11, 21 /))) call abort +end Index: libgomp/testsuite/libgomp.fortran/pr81841.f90 =================================================================== --- libgomp/testsuite/libgomp.fortran/pr81841.f90 (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.fortran/pr81841.f90 (.../branches/gcc-7-branch) @@ -0,0 +1,26 @@ +! PR fortran/81841 +! { dg-do run } + +block data + integer :: a + real :: b(2) + common /c/ a, b + !$omp threadprivate (/c/) + data a / 32 / + data b /2*1./ +end + +program pr81841 + use omp_lib + integer :: e + real :: f(2) + common /c/ e, f + !$omp threadprivate (/c/) + !$omp parallel num_threads(8) + if ((e /= 32) .or. any(f /= 1.)) call abort + e = omp_get_thread_num () + f = e + 19. + !$omp barrier + if ((e /= omp_get_thread_num ()) .or. any(f /= e + 19.)) call abort + !$omp end parallel +end Index: libgomp/testsuite/libgomp.c/pr81687-2.c =================================================================== --- libgomp/testsuite/libgomp.c/pr81687-2.c (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c/pr81687-2.c (.../branches/gcc-7-branch) @@ -0,0 +1,27 @@ +/* PR c/81687 */ +/* { dg-do link } */ +/* { dg-additional-options "-O2" } */ + +int +main () +{ + __label__ lab4, lab5, lab6; + volatile int l = 0; + int m = l; + void foo (int x) { if (x == 1) goto lab4; } + void bar (int x) { if (x == 2) goto lab5; } + void baz (int x) { if (x == 3) goto lab6; } + #pragma omp parallel + { + foo (m + 1); + lab4:; + } + #pragma omp task + { + bar (m + 2); + lab5:; + } + baz (m + 3); + lab6:; + return 0; +} Index: libgomp/testsuite/libgomp.c/pr81875.c =================================================================== --- libgomp/testsuite/libgomp.c/pr81875.c (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c/pr81875.c (.../branches/gcc-7-branch) @@ -0,0 +1,46 @@ +/* { dg-do run } */ + +extern +#ifdef __cplusplus +"C" +#endif +void abort (void); + +#define N 32ULL +int a[N]; + +const unsigned long long c = 0x7fffffffffffffffULL; + +void +f2_tpf_static32 (void) +{ + unsigned long long i; + #pragma omp for + for (i = c + N; i > c; i -= 1ULL) + a[i - 1ULL - c] -= 4; +} + +__attribute__((noinline, noclone)) int +test_tpf_static32 (void) +{ + int i, j, k; + for (i = 0; i < N; i++) + a[i] = i - 25; + + f2_tpf_static32 (); + + for (i = 0; i < N; i++) + if (a[i] != i - 29) + return 1; + + return 0; +} + +int +main () +{ + if (test_tpf_static32 ()) + abort (); + + return 0; +} Index: libgomp/testsuite/libgomp.c/pr45784.c =================================================================== --- libgomp/testsuite/libgomp.c/pr45784.c (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c/pr45784.c (.../branches/gcc-7-branch) @@ -0,0 +1,41 @@ +/* PR c/45784 */ +/* { dg-do run } */ + +void +foo (int n) +{ + char *p, vla[2 * n]; + int i; + #pragma omp parallel for + for (p = vla; p < vla + (sizeof (vla) / sizeof (vla[0])); p++) + *p = ' '; + #pragma omp parallel for + for (i = 0; i < 2 * n; i++) + if (vla[i] != ' ') + __builtin_abort (); +} + +void +bar (int n) +{ + char *p, vla1[n], vla2[n * 2], vla3[n * 3], vla4[n * 4]; + int i; + __builtin_memset (vla4, ' ', n * 4); + #pragma omp parallel for + for (p = vla4 + sizeof (vla1); p < vla4 + sizeof (vla3) - sizeof (vla2) + sizeof (vla1); p += sizeof (vla4) / sizeof (vla4)) + p[0] = '!'; + #pragma omp parallel for + for (i = 0; i < n * 4; i++) + if (vla4[i] != ((i >= n && i < 2 * n) ? '!' : ' ')) + __builtin_abort (); +} + +int +main () +{ + volatile int n; + n = 128; + foo (n); + bar (n); + return 0; +} Index: libgomp/testsuite/libgomp.c/pr81687-1.c =================================================================== --- libgomp/testsuite/libgomp.c/pr81687-1.c (.../tags/gcc_7_2_0_release) (nonexistent) +++ libgomp/testsuite/libgomp.c/pr81687-1.c (.../branches/gcc-7-branch) @@ -0,0 +1,23 @@ +/* PR c/81687 */ +/* { dg-do link } */ +/* { dg-additional-options "-O2" } */ + +extern int printf (const char *, ...); + +int +main () +{ + #pragma omp parallel + { + lab1: + printf ("lab1=%p\n", (void *)(&&lab1)); + } + lab2: + #pragma omp parallel + { + lab3: + printf ("lab2=%p\n", (void *)(&&lab2)); + } + printf ("lab3=%p\n", (void *)(&&lab3)); + return 0; +} Index: libsanitizer/include/system/sys/ptrace.h =================================================================== --- libsanitizer/include/system/sys/ptrace.h (.../tags/gcc_7_2_0_release) (nonexistent) +++ libsanitizer/include/system/sys/ptrace.h (.../branches/gcc-7-branch) @@ -0,0 +1,7 @@ +#include_next +#ifndef PTRACE_GETREGSET +/* glibc before + https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cbff0d9689c4d68578b6a4f0a17807232506ea27 + doesn't define PTRACE_GETREGSET. */ +#define PTRACE_GETREGSET 0x4204 +#endif Index: libsanitizer/ChangeLog =================================================================== --- libsanitizer/ChangeLog (.../tags/gcc_7_2_0_release) +++ libsanitizer/ChangeLog (.../branches/gcc-7-branch) @@ -1,3 +1,25 @@ +2017-10-20 Jakub Jelinek + + PR sanitizer/82595 + * lsan/Makefile.am (lsan_files): Remove lsan_preinit.cc. + * lsan/Makefile.in: Regenerated. + +2017-10-05 H.J. Lu + + Backported from mainline + 2017-10-05 H.J. Lu + + PR sanitizer/82379 + * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set + to sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC. + +2017-09-07 Jakub Jelinek + + Backported from mainline + 2017-08-07 Jakub Jelinek + + * include/system/sys/ptrace.h: New file. + 2017-08-14 Release Manager * GCC 7.2.0 released. Index: libsanitizer/lsan/Makefile.in =================================================================== --- libsanitizer/lsan/Makefile.in (.../tags/gcc_7_2_0_release) +++ libsanitizer/lsan/Makefile.in (.../branches/gcc-7-branch) @@ -109,7 +109,7 @@ $(am__append_1) $(am__DEPENDENCIES_1) am__objects_1 = lsan_common.lo lsan_common_linux.lo am__objects_2 = $(am__objects_1) lsan.lo lsan_allocator.lo \ - lsan_interceptors.lo lsan_preinit.lo lsan_thread.lo + lsan_interceptors.lo lsan_thread.lo am_liblsan_la_OBJECTS = $(am__objects_2) liblsan_la_OBJECTS = $(am_liblsan_la_OBJECTS) liblsan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ @@ -306,7 +306,6 @@ lsan.cc \ lsan_allocator.cc \ lsan_interceptors.cc \ - lsan_preinit.cc \ lsan_thread.cc libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files) @@ -447,7 +446,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_common_linux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_interceptors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_preinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsan_thread.Plo@am__quote@ .cc.o: Index: libsanitizer/lsan/Makefile.am =================================================================== --- libsanitizer/lsan/Makefile.am (.../tags/gcc_7_2_0_release) +++ libsanitizer/lsan/Makefile.am (.../branches/gcc-7-branch) @@ -23,7 +23,6 @@ lsan.cc \ lsan_allocator.cc \ lsan_interceptors.cc \ - lsan_preinit.cc \ lsan_thread.cc libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files) Index: libsanitizer/configure.tgt =================================================================== --- libsanitizer/configure.tgt (.../tags/gcc_7_2_0_release) +++ libsanitizer/configure.tgt (.../branches/gcc-7-branch) @@ -27,6 +27,8 @@ TSAN_SUPPORTED=yes LSAN_SUPPORTED=yes TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo + fi + if echo "int x = __x86_64__;" | $CC -c -x c -o /dev/null - > /dev/null 2>&1; then SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=sanitizer_linux_x86_64.lo fi ;; Index: libstdc++-v3/python/libstdcxx/v6/printers.py =================================================================== --- libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-7-branch) @@ -1277,7 +1277,7 @@ Recognizes type names that match a regular expression. Replaces them with a formatted string which can use replacement field {N} to refer to the \N subgroup of the regex match. - Type printers are recusively applied to the subgroups. + Type printers are recursively applied to the subgroups. This allows recognizing e.g. "std::vector<(.*), std::allocator<\\1> >" and replacing it with "std::vector<{1}>", omitting the template argument @@ -1473,15 +1473,15 @@ 'unordered_multiset<{1}>') # strip the "fundamentals_v1" inline namespace from these types - add_one_template_type_printer(obj, 'any', - 'experimental::fundamentals_v\d::any<(.*)>', - 'experimental::any<\\1>') + add_one_template_type_printer(obj, 'any', + 'experimental::fundamentals_v\d::any', + 'experimental::any') add_one_template_type_printer(obj, 'optional', 'experimental::fundamentals_v\d::optional<(.*)>', - 'experimental::optional<\\1>') + 'experimental::optional<{1}>') add_one_template_type_printer(obj, 'basic_string_view', 'experimental::fundamentals_v\d::basic_string_view<(.*), std::char_traits<\\1> >', - 'experimental::basic_string_view<\\1>') + 'experimental::basic_string_view<{1}>') def register_libstdcxx_printers (obj): "Register libstdc++ pretty-printers with objfile Obj." Index: libstdc++-v3/src/filesystem/ops.cc =================================================================== --- libstdc++-v3/src/filesystem/ops.cc (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/src/filesystem/ops.cc (.../branches/gcc-7-branch) @@ -443,48 +443,68 @@ return false; } + size_t count = from_st->st_size; #ifdef _GLIBCXX_USE_SENDFILE off_t offset = 0; - const auto n = ::sendfile(out.fd, in.fd, &offset, from_st->st_size); - if (n < 0 && (errno == ENOSYS || errno == EINVAL)) + ssize_t n = ::sendfile(out.fd, in.fd, &offset, count); + if (n < 0 && errno != ENOSYS && errno != EINVAL) { -#endif - __gnu_cxx::stdio_filebuf sbin(in.fd, std::ios::in); - __gnu_cxx::stdio_filebuf sbout(out.fd, std::ios::out); - if (sbin.is_open()) - in.fd = -1; - if (sbout.is_open()) - out.fd = -1; - if (from_st->st_size && !(std::ostream(&sbout) << &sbin)) + ec.assign(errno, std::generic_category()); + return false; + } + if ((size_t)n == count) + { + if (!out.close() || !in.close()) { - ec = std::make_error_code(std::errc::io_error); - return false; - } - if (!sbout.close() || !sbin.close()) - { ec.assign(errno, std::generic_category()); return false; } - ec.clear(); return true; + } + else if (n > 0) + count -= n; +#endif // _GLIBCXX_USE_SENDFILE + using std::ios; + __gnu_cxx::stdio_filebuf sbin(in.fd, ios::in|ios::binary); + __gnu_cxx::stdio_filebuf sbout(out.fd, ios::out|ios::binary); + + if (sbin.is_open()) + in.fd = -1; + if (sbout.is_open()) + out.fd = -1; + #ifdef _GLIBCXX_USE_SENDFILE + if (n != 0) + { + if (n < 0) + n = 0; + + const auto p1 = sbin.pubseekoff(n, ios::beg, ios::in); + const auto p2 = sbout.pubseekoff(n, ios::beg, ios::out); + + const std::streampos errpos(std::streamoff(-1)); + if (p1 == errpos || p2 == errpos) + { + ec = std::make_error_code(std::errc::io_error); + return false; + } } - if (n != from_st->st_size) +#endif + + if (count && !(std::ostream(&sbout) << &sbin)) { - ec.assign(errno, std::generic_category()); + ec = std::make_error_code(std::errc::io_error); return false; } - if (!out.close() || !in.close()) + if (!sbout.close() || !sbin.close()) { ec.assign(errno, std::generic_category()); return false; } - ec.clear(); return true; -#endif } } #endif @@ -1199,26 +1219,45 @@ fs::path fs::read_symlink(const path& p, error_code& ec) { + path result; #ifdef _GLIBCXX_HAVE_SYS_STAT_H stat_type st; if (::lstat(p.c_str(), &st)) { ec.assign(errno, std::generic_category()); - return {}; + return result; } - std::string buf(st.st_size, '\0'); - ssize_t len = ::readlink(p.c_str(), &buf.front(), buf.size()); - if (len == -1) + std::string buf(st.st_size ? st.st_size + 1 : 128, '\0'); + do { - ec.assign(errno, std::generic_category()); - return {}; + ssize_t len = ::readlink(p.c_str(), &buf.front(), buf.size()); + if (len == -1) + { + ec.assign(errno, std::generic_category()); + return result; + } + else if (len == (ssize_t)buf.size()) + { + if (buf.size() > 4096) + { + ec.assign(ENAMETOOLONG, std::generic_category()); + return result; + } + buf.resize(buf.size() * 2); + } + else + { + buf.resize(len); + result.assign(buf); + ec.clear(); + break; + } } - ec.clear(); - return path{buf.data(), buf.data()+len}; + while (true); #else ec = std::make_error_code(std::errc::not_supported); - return {}; #endif + return result; } @@ -1227,7 +1266,7 @@ { error_code ec; bool result = fs::remove(p, ec); - if (ec.value()) + if (ec) _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot remove", p, ec)); return result; } @@ -1235,16 +1274,15 @@ bool fs::remove(const path& p, error_code& ec) noexcept { - if (exists(symlink_status(p, ec))) + if (::remove(p.c_str()) == 0) { - if (::remove(p.c_str()) == 0) - { - ec.clear(); - return true; - } - else - ec.assign(errno, std::generic_category()); + ec.clear(); + return true; } + else if (errno == ENOENT) + ec.clear(); + else + ec.assign(errno, std::generic_category()); return false; } @@ -1253,8 +1291,8 @@ fs::remove_all(const path& p) { error_code ec; - bool result = remove_all(p, ec); - if (ec.value()) + const auto result = remove_all(p, ec); + if (ec) _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot remove all", p, ec)); return result; } @@ -1262,14 +1300,28 @@ std::uintmax_t fs::remove_all(const path& p, error_code& ec) noexcept { - auto fs = symlink_status(p, ec); + const auto s = symlink_status(p, ec); + if (!status_known(s)) + return -1; + + ec.clear(); + if (s.type() == file_type::not_found) + return 0; + uintmax_t count = 0; - if (ec.value() == 0 && fs.type() == file_type::directory) - for (directory_iterator d(p, ec), end; ec.value() == 0 && d != end; ++d) - count += fs::remove_all(d->path(), ec); - if (ec.value()) - return -1; - return fs::remove(p, ec) ? ++count : -1; // fs:remove() calls ec.clear() + if (s.type() == file_type::directory) + { + for (directory_iterator d(p, ec), end; !ec && d != end; d.increment(ec)) + count += fs::remove_all(d->path(), ec); + if (ec.value() == ENOENT) + ec.clear(); + else if (ec) + return -1; + } + + if (fs::remove(p, ec)) + ++count; + return ec ? -1 : count; } void Index: libstdc++-v3/doc/xml/manual/intro.xml =================================================================== --- libstdc++-v3/doc/xml/manual/intro.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/intro.xml (.../branches/gcc-7-branch) @@ -986,6 +986,12 @@ Add deleted constructors. + 2332: + Unnecessary copying when inserting into maps with braced-init syntax + + Add overloads of insert taking value_type&& rvalues. + + 2399: shared_ptr's constructor from unique_ptr should be constrained Index: libstdc++-v3/doc/xml/manual/status_cxxtr1.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxxtr1.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxxtr1.xml (.../branches/gcc-7-branch) @@ -22,8 +22,7 @@ -This page describes the TR1 support in mainline GCC SVN, not in any particular -release. +This page describes the TR1 support in the GCC 7 series. Index: libstdc++-v3/doc/xml/manual/status_cxx1998.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxx1998.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxx1998.xml (.../branches/gcc-7-branch) @@ -18,8 +18,7 @@ -This page describes the C++ support in mainline GCC SVN, not in any -particular release. +This page describes the C++ support in the GCC 7 series. Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-7-branch) @@ -27,8 +27,7 @@ -This page describes the C++11 support in mainline GCC SVN, not in any -particular release. +This page describes the C++11 support in the GCC 7 series. Index: libstdc++-v3/doc/xml/manual/status_cxx2014.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxx2014.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxx2014.xml (.../branches/gcc-7-branch) @@ -20,8 +20,7 @@ -This page describes the C++14 and library TS support in mainline GCC SVN, -not in any particular release. +This page describes the C++14 and library TS support in the GCC 7 series. Index: libstdc++-v3/doc/xml/manual/status_cxx2017.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxx2017.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxx2017.xml (.../branches/gcc-7-branch) @@ -1,17 +1,17 @@
- + xml:id="status.iso.2017" xreflabel="Status C++ 2017"> + -C++ 201z +C++ 2017 ISO C++ - 201z + 2017 -In this implementation the -std=gnu++1z or --std=c++1z flag must be used to enable language +In this implementation the -std=gnu++17 or +-std=c++17 flag must be used to enable language and library features. See dialect options. The pre-defined symbol @@ -20,13 +20,12 @@ -This section describes the C++1z and library TS support in mainline GCC SVN, -not in any particular release. +This section describes the C++17 and library TS support in the GCC 7 series. The following table lists new library features that have been accepted into -the C++1z working draft. The "Proposal" column provides a link to the +the C++17 working draft. The "Proposal" column provides a link to the ISO C++ committee proposal that describes the feature, while the "Status" column indicates the first version of GCC that contains an implementation of this feature (if it has been implemented). @@ -35,8 +34,8 @@ Feature-testing recommendations for C++. -
-C++ 201z Implementation Status +
+C++ 2017 Implementation Status @@ -75,7 +74,7 @@ P0137R1 - 7 + 7.1 __cpp_lib_launder >= 201606 @@ -97,8 +96,11 @@ P0088R3 - 7 - __has_include(<variant>) + 7.1 + __has_include(<variant>), + __cpp_lib_variant >= 201603 + (since 7.3, see Note 1) + @@ -108,8 +110,11 @@ P0220R1 - 7 - __has_include(<optional>) + 7.1 + __has_include(<optional>), + __cpp_lib_optional >= 201603 + (since 7.3, see Note 1) + @@ -119,8 +124,11 @@ P0220R1 - 7 - __has_include(<any>) + 7.1 + __has_include(<any>), + __cpp_lib_any >= 201603 + (since 7.3, see Note 1) + @@ -130,8 +138,11 @@ P0220R1 - 7 - __has_include(<string_view>) + 7.1 + __has_include(<string_view>), + __cpp_lib_string_view >= 201603 + (since 7.3, see Note 1) + @@ -143,7 +154,9 @@ No - __has_include(<memory_resource>) + __has_include(<memory_resource>), + __cpp_lib_memory_resource >= 201603 + @@ -153,7 +166,7 @@ P0220R1 - 7 + 7.1 __cpp_lib_apply >= 201603 @@ -164,7 +177,7 @@ P0220R1 - 7 + 7.1 __cpp_lib_shared_ptr_arrays >= 201603 @@ -175,7 +188,7 @@ P0220R1 - 7 + 7.1 __cpp_lib_boyer_moore_searcher >= 201603 @@ -186,7 +199,7 @@ P0220R1 - 7 + 7.1 __cpp_lib_sample >= 201603 @@ -197,7 +210,7 @@ P0007R1 - 7 + 7.1 __cpp_lib_as_const >= 201510 @@ -219,7 +232,7 @@ P0209R2 - 7 + 7.1 __cpp_lib_make_from_tuple >= 201606 @@ -257,7 +270,7 @@ P0074R0 - 7 + 7.1 __cpp_lib_transparent_operators >= 201510 @@ -268,7 +281,7 @@ LWG2296 - 7 + 7.1 __cpp_lib_addressof_constexpr >= 201603 @@ -301,7 +314,7 @@ P0033R1 - 7 + 7.1 __cpp_lib_enable_shared_from_this >= 201603 @@ -334,7 +347,7 @@ P0005R4 - 7 + 7.1 __cpp_lib_not_fn >= 201603 @@ -345,7 +358,7 @@ P0358R1 - 7 + 7.1 @@ -356,7 +369,7 @@ P0253R1 - 7 + 7.1 @@ -367,7 +380,7 @@ P0040R3 - 7 + 7.1 @@ -378,7 +391,7 @@ P0163R0 - 7 + 7.1 __cpp_lib_shared_ptr_weak_type >= 201606 @@ -411,7 +424,7 @@ P0006R0 - 7 + 7.1 __cpp_lib_type_trait_variable_templates >= 201510 @@ -444,7 +457,7 @@ P0077R2 - 7 + 7.1 __cpp_lib_is_callable >= 201603 @@ -455,7 +468,7 @@ P0258R2 - 7 + 7.1 __cpp_lib_has_unique_object_representations >= 201606 @@ -466,7 +479,7 @@ P0092R1 - 7 + 7.1 __cpp_lib_chrono >= 201510 @@ -477,12 +490,13 @@ P0505R0 - 7 - ??? + 7.1 + __cpp_lib_chrono >= 201611 + (since 7.3, see Note 2) + - Constexpr for std::char_traits @@ -489,8 +503,8 @@ P0426R1 - 7 (partial) - ??? + 7.3 + __cpp_lib_constexpr_char_traits >= 201611 @@ -500,7 +514,7 @@ P0254R2 - 7 + 7.1 @@ -511,7 +525,7 @@ P0272R1 - 7 + 7.1 @@ -544,9 +558,9 @@ N4510 - 6.2 (3.0) + 3.0 __cpp_lib_incomplete_container_elements >= 201505 - (the feature was always supported, but the macro was not defined until GCC 6.2) + (since 6.2, see Note 2) @@ -557,8 +571,8 @@ P0084R2 - 7 - ??? + 7.1 + @@ -581,7 +595,7 @@ P0083R3 - 7 + 7.1 __cpp_lib_node_extract >= 201606 @@ -603,7 +617,7 @@ P0031R0 - 7 + 7.1 __cpp_lib_array_constexpr >= 201603 @@ -617,7 +631,9 @@ No __has_include(<execution>) , - __cpp_lib_parallel_algorithm >= 201603 + __cpp_lib_execution >= 201603 , + __cpp_lib_parallel_algorithm >= 201603 + @@ -627,7 +643,7 @@ P0025R0 - 7 + 7.1 __cpp_lib_clamp >= 201603 @@ -638,10 +654,8 @@ P0295R0 - 7 - __cpp_lib_gcd >= 201606 , - __cpp_lib_lcm >= 201606 - + 7.1 + __cpp_lib_gcd_lcm >= 201606 @@ -651,7 +665,7 @@ P0030R1 - 7 + 7.1 __cpp_lib_hypot >= 201603 @@ -662,11 +676,9 @@ P0226R1 - 7 (6.1) + 7.1 __cpp_lib_math_special_functions >= 201603 - (for GCC 6 or pre-C++17 define - __STDCPP_WANT_MATH_SPEC_FUNCS__ to a non-zero value - and test for __STDCPP_MATH_SPEC_FUNCS__ >= 201003L) + (see Note 3) @@ -692,7 +704,7 @@ No - + __cpp_lib_filesystem >= 201606 @@ -704,10 +716,22 @@ No - + __cpp_lib_filesystem >= 201606 + + Directory Entry Caching for Filesystem + + + P0317R1 + + + No + __cpp_lib_filesystem >= 201703 + + + constexpr atomic<T>::is_always_lock_free @@ -714,7 +738,7 @@ P0152R1 - 7 + 7.1 __cpp_lib_atomic_is_always_lock_free >= 201603 @@ -730,29 +754,30 @@ - Variadic lock_guard + Variadic lock_guard (Rev. 5) P0156R2 - 7 + 7.1 __cpp_lib_scoped_lock >= 201703 - byte type definition + A byte type definition P0298R3 - 7 - ??? + 7.1 + __cpp_lib_byte >= 201603 (since 7.3, see Note 2) + - + Elementary string conversions @@ -759,8 +784,9 @@ P0067R5 - No - ??? + 8 (only integral types supported) + __has_include(<charconv>) + __cpp_lib_to_chars >= 201611 @@ -768,8 +794,26 @@
+ +Note 1: This feature is supported in GCC 7.1 and 7.2 but before GCC 7.3 the +__cpp_lib macro is not defined, and compilation will fail if the +header is included without using to enable C++17 support. + - + +Note 2: This feature is supported in older releases but the +__cpp_lib macro is not defined to the right value +(or not defined at all) until the version shown in parentheses. + + + +Note 3: The mathematical special functions are enabled in C++17 mode from +GCC 7.1 onwards. For GCC 6.x or for C++11/C++14 define +__STDCPP_WANT_MATH_SPEC_FUNCS__ to a non-zero value +and test for __STDCPP_MATH_SPEC_FUNCS__ >= 201003L. + + +
C++ Technical Specifications Implementation Status Index: libstdc++-v3/doc/xml/manual/extensions.xml =================================================================== --- libstdc++-v3/doc/xml/manual/extensions.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/extensions.xml (.../branches/gcc-7-branch) @@ -502,7 +502,7 @@ demangling. - If you have read the source + If you have read the source documentation for namespace abi then you are aware of the cross-vendor C++ ABI in use by GCC. One of the exposed functions is used for demangling, Index: libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml =================================================================== --- libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml (.../branches/gcc-7-branch) @@ -16,8 +16,7 @@ -This page describes the TR 24733 support in mainline GCC SVN, not in any -particular release. +This page describes the TR 24733 support in the GCC 7 series. Index: libstdc++-v3/doc/html/bk02.html =================================================================== --- libstdc++-v3/doc/html/bk02.html (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/html/bk02.html (.../branches/gcc-7-branch) @@ -1,2 +1,2 @@ -
Prev   Next

\ No newline at end of file + \ No newline at end of file Index: libstdc++-v3/doc/html/bk03.html =================================================================== --- libstdc++-v3/doc/html/bk03.html (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/html/bk03.html (.../branches/gcc-7-branch) @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file Index: libstdc++-v3/doc/html/faq.html =================================================================== --- libstdc++-v3/doc/html/faq.html (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/html/faq.html (.../branches/gcc-7-branch) @@ -1,5 +1,5 @@ -Frequently Asked Questions

Frequently Asked Questions

Frequently Asked Questions

The GNU C++ Library

Short Contents

+The GNU C++ Library

The GNU C++ Library

Short Contents

Copyright (C) 2008-2017 FSF @@ -23,7 +23,7 @@


Table of Contents

The GNU C++ Library Manual
I. Introduction -
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
C++ 201z
Implementation Specific Behavior
C++ TR1
Implementation Specific Behavior
C++ TR 24733
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Versions of Library Binary Files
Memory Leak Hunting
Data Race Hunting
Using gdb
Tracking uncaught exceptions
Debug Mode
Compile Time Checking
Profile-based Performance Analysis
II. +
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
C++ 2017
Implementation Specific Behavior
C++ TR1
Implementation Specific Behavior
C++ TR 24733
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Versions of Library Binary Files
Memory Leak Hunting
Data Race Hunting
Using gdb
Tracking uncaught exceptions
Debug Mode
Compile Time Checking
Profile-based Performance Analysis
II. Standard Contents
4. Support Index: libstdc++-v3/doc/html/api.html =================================================================== --- libstdc++-v3/doc/html/api.html (.../tags/gcc_7_2_0_release) +++ libstdc++-v3/doc/html/api.html (.../branches/gcc-7-branch) @@ -1,5 +1,5 @@ -The GNU C++ Library API Reference

The GNU C++ Library API Reference

The GNU C++ Library API Reference