diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2015-08-19 16:04:29 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2015-08-19 16:04:29 +0000 |
commit | 760637267afc8e4c480b688f838f402c66ccf0be (patch) | |
tree | da2cc1532a277d0e3a501d5b813ce8889129ba5e | |
parent | 5d64e498e6e7edb1590902daaa20445fac1d4dbc (diff) | |
download | gcc-5-760637267afc8e4c480b688f838f402c66ccf0be.tar.gz |
* Update to SVN 20150819 (r227013, 5.2.1) from the gcc-5-branch.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-5@8202 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/pr66857.diff | 51 | ||||
-rw-r--r-- | debian/patches/svn-updates.diff | 13353 | ||||
-rw-r--r-- | debian/rules.patch | 1 |
4 files changed, 12959 insertions, 449 deletions
diff --git a/debian/changelog b/debian/changelog index f4a9be9..3904cb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ gcc-5 (5.2.1-16) UNRELEASED; urgency=medium + * Update to SVN 20150819 (r227013, 5.2.1) from the gcc-5-branch. * Again, configure with --enable-targets=powerpcle-linux on ppc64el. - -- Matthias Klose <doko@debian.org> Sun, 09 Aug 2015 12:32:33 +0200 + -- Matthias Klose <doko@debian.org> Wed, 19 Aug 2015 18:04:00 +0200 gcc-5 (5.2.1-15) unstable; urgency=medium diff --git a/debian/patches/pr66857.diff b/debian/patches/pr66857.diff deleted file mode 100644 index be8c57a..0000000 --- a/debian/patches/pr66857.diff +++ /dev/null @@ -1,51 +0,0 @@ -# DP: Fix PR c++/66857, taken from the trunk - -gcc/cp/ - -2015-07-25 Patrick Palka <ppalka@gcc.gnu.org> - - PR c++/66857 - * cvt.c (ocp_convert): Don't call scalar_constant_value when - converting to a class type. - -gcc/testsuite/ - -2015-07-25 Patrick Palka <ppalka@gcc.gnu.org> - - PR c++/66857 - * g++.dg/init/pr66857.C: New test. - ---- a/src/gcc/cp/cvt.c -+++ b/src/gcc/cp/cvt.c -@@ -687,7 +687,8 @@ - } - - /* FIXME remove when moving to c_fully_fold model. */ -- e = scalar_constant_value (e); -+ if (!CLASS_TYPE_P (type)) -+ e = scalar_constant_value (e); - if (error_operand_p (e)) - return error_mark_node; - ---- a/src/gcc/testsuite/g++.dg/init/pr66857.C -+++ b/src/gcc/testsuite/g++.dg/init/pr66857.C -@@ -0,0 +1,19 @@ -+// PR c++/66857 -+// { dg-do run } -+ -+const int i = 0; -+ -+struct Test -+{ -+ Test (const int &rhs) -+ { -+ if (&rhs != &i) -+ __builtin_abort (); -+ } -+}; -+ -+int -+main (void) -+{ -+ Test test = i; -+} diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index 312e116..c4e1ece 100644 --- a/debian/patches/svn-updates.diff +++ b/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 5 branch upto 20150808 (r226731). +# DP: updates from the 5 branch upto 20150819 (r227013). last_update() { cat > ${dir}LAST_UPDATED <EOF -Sat Aug 8 11:15:17 CEST 2015 -Sat Aug 8 09:15:17 UTC 2015 (revision 226731) +Wed Aug 19 17:23:47 CEST 2015 +Wed Aug 19 15:23:47 UTC 2015 (revision 227013) EOF } @@ -12,6 +12,6839 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_5_2_0_release svn://gcc.gnu.o | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libstdc++-v3/configure +=================================================================== +--- a/src/libstdc++-v3/configure (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/configure (.../branches/gcc-5-branch) +@@ -638,6 +638,8 @@ + DOXYGEN + BUILD_INFO_FALSE + BUILD_INFO_TRUE ++ENABLE_FILESYSTEM_TS_FALSE ++ENABLE_FILESYSTEM_TS_TRUE + baseline_subdir_switch + baseline_dir + HWCAP_FLAGS +@@ -890,6 +892,7 @@ + enable_libstdcxx_dual_abi + with_default_libstdcxx_abi + enable_libstdcxx_threads ++enable_libstdcxx_filesystem_ts + with_gxx_include_dir + enable_version_specific_runtime_libs + ' +@@ -1588,6 +1591,8 @@ + support two versions of std::string [default=yes] + --enable-libstdcxx-threads + enable C++11 threads support [default=auto] ++ --enable-libstdcxx-filesystem-ts ++ turns on ISO/IEC TS 18822 support [default=auto] + --enable-version-specific-runtime-libs + Specify that runtime libraries should be installed + in a compiler-specific directory +@@ -3604,11 +3609,12 @@ + + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. +-# Always define AMTAR for backward compatibility. ++# Always define AMTAR for backward compatibility. Yes, it's still used ++# in the wild :-( We should find a proper way to deprecate it ... ++AMTAR='$${TAR-tar}' + +-AMTAR=${AMTAR-"${am_missing_run}tar"} ++am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + +-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + +@@ -3616,7 +3622,6 @@ + + + +- + # -fno-builtin must be present here so that a non-conflicting form of + # std::exit can be guessed by AC_PROG_CXX, and used in later tests. + +@@ -4951,7 +4956,7 @@ + # expandable list at autoconf time; the second provides an expandable list + # (i.e., shell variable) at configure time. + +- SUBDIRS='include libsupc++ python src src/c++98 src/c++11 doc po testsuite' ++ SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/filesystem doc po testsuite python' + + # These need to be absolute paths, yet at the same time need to + # canonicalize only relative paths, because then amd will not unmount +@@ -11593,7 +11598,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11596 "configure" ++#line 11601 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11699,7 +11704,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11702 "configure" ++#line 11707 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -15119,7 +15124,7 @@ + # + # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. + cat > conftest.$ac_ext << EOF +-#line 15122 "configure" ++#line 15127 "configure" + struct S { ~S(); }; + void bar(); + void foo() +@@ -15471,7 +15476,7 @@ + # Fake what AC_TRY_COMPILE does. + + cat > conftest.$ac_ext << EOF +-#line 15474 "configure" ++#line 15479 "configure" + int main() + { + typedef bool atomic_type; +@@ -15506,7 +15511,7 @@ + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15509 "configure" ++#line 15514 "configure" + int main() + { + typedef short atomic_type; +@@ -15541,7 +15546,7 @@ + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15544 "configure" ++#line 15549 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +@@ -15577,7 +15582,7 @@ + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15580 "configure" ++#line 15585 "configure" + int main() + { + typedef long long atomic_type; +@@ -15656,7 +15661,7 @@ + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 15659 "configure" ++#line 15664 "configure" + int main() + { + _Decimal32 d1; +@@ -15698,7 +15703,7 @@ + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 15701 "configure" ++#line 15706 "configure" + template<typename T1, typename T2> + struct same + { typedef T2 type; }; +@@ -15732,7 +15737,7 @@ + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15735 "configure" ++#line 15740 "configure" + template<typename T1, typename T2> + struct same + { typedef T2 type; }; +@@ -78867,6 +78872,508 @@ + + + ++# For Filesystem TS. ++for ac_header in fcntl.h dirent.h sys/statvfs.h utime.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++eval as_val=\$$as_ac_Header ++ if test "x$as_val" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++ ++done ++ ++ ++ # Check whether --enable-libstdcxx-filesystem-ts was given. ++if test "${enable_libstdcxx_filesystem_ts+set}" = set; then : ++ enableval=$enable_libstdcxx_filesystem_ts; ++ case "$enableval" in ++ yes|no|auto) ;; ++ *) as_fn_error "Unknown argument to enable/disable libstdcxx-filesystem-ts" "$LINENO" 5 ;; ++ esac ++ ++else ++ enable_libstdcxx_filesystem_ts=auto ++fi ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Filesystem TS support" >&5 ++$as_echo_n "checking whether to build Filesystem TS support... " >&6; } ++ if test x"$ac_cv_header_dirent_h" != x"yes"; then ++ enable_libstdcxx_filesystem_ts=no ++ fi ++ if test x"$enable_libstdcxx_filesystem_ts" = x"auto"; then ++ case "${target_os}" in ++ freebsd*|netbsd*|openbsd*|dragonfly*|darwin*) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ solaris*) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ *) ++ enable_libstdcxx_filesystem_ts=no ++ ;; ++ esac ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libstdcxx_filesystem_ts" >&5 ++$as_echo "$enable_libstdcxx_filesystem_ts" >&6; } ++ ++ ++ ++ ac_ext=cpp ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ++ ++ ac_save_CXXFLAGS="$CXXFLAGS" ++ CXXFLAGS="$CXXFLAGS -fno-exceptions" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_type" >&5 ++$as_echo_n "checking for struct dirent.d_type... " >&6; } ++ if test "${glibcxx_cv_dirent_d_type+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <dirent.h> ++int ++main () ++{ ++ ++ struct dirent d; ++ if (sizeof d.d_type) return 0; ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_dirent_d_type=yes ++else ++ glibcxx_cv_dirent_d_type=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <dirent.h> ++int ++main () ++{ ++ ++ struct dirent d; ++ if (sizeof d.d_type) return 0; ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_dirent_d_type=yes ++else ++ glibcxx_cv_dirent_d_type=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_dirent_d_type = yes; then ++ ++$as_echo "#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_dirent_d_type" >&5 ++$as_echo "$glibcxx_cv_dirent_d_type" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for realpath" >&5 ++$as_echo_n "checking for realpath... " >&6; } ++ if test "${glibcxx_cv_realpath+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <stdlib.h> ++int ++main () ++{ ++char *tmp = realpath((const char*)NULL, (char*)NULL); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_realpath=yes ++else ++ glibcxx_cv_realpath=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <stdlib.h> ++int ++main () ++{ ++char *tmp = realpath((const char*)NULL, (char*)NULL); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_realpath=yes ++else ++ glibcxx_cv_realpath=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_realpath = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_REALPATH 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_realpath" >&5 ++$as_echo "$glibcxx_cv_realpath" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5 ++$as_echo_n "checking for utimensat... " >&6; } ++ if test "${glibcxx_cv_utimensat+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ++int ++main () ++{ ++ ++ struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; ++ int i = utimensat(AT_FDCWD, "path", ts, 0); ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_utimensat=yes ++else ++ glibcxx_cv_utimensat=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ++int ++main () ++{ ++ ++ struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; ++ int i = utimensat(AT_FDCWD, "path", ts, 0); ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_utimensat=yes ++else ++ glibcxx_cv_utimensat=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_utimensat = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_UTIMENSAT 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utimensat" >&5 ++$as_echo "$glibcxx_cv_utimensat" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat.st_mtim.tv_nsec" >&5 ++$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; } ++ if test "${glibcxx_cv_st_mtim+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ #include <sys/stat.h> ++int ++main () ++{ ++ ++ struct stat st; ++ return st.st_mtim.tv_nsec; ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_st_mtim=yes ++else ++ glibcxx_cv_st_mtim=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ #include <sys/stat.h> ++int ++main () ++{ ++ ++ struct stat st; ++ return st.st_mtim.tv_nsec; ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_st_mtim=yes ++else ++ glibcxx_cv_st_mtim=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_st_mtim = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_ST_MTIM 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_st_mtim" >&5 ++$as_echo "$glibcxx_cv_st_mtim" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmod" >&5 ++$as_echo_n "checking for fchmod... " >&6; } ++ if test "${glibcxx_cv_fchmod+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <sys/stat.h> ++int ++main () ++{ ++fchmod(1, S_IWUSR); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_fchmod=yes ++else ++ glibcxx_cv_fchmod=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <sys/stat.h> ++int ++main () ++{ ++fchmod(1, S_IWUSR); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_fchmod=yes ++else ++ glibcxx_cv_fchmod=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_fchmod = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_FCHMOD 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmod" >&5 ++$as_echo "$glibcxx_cv_fchmod" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5 ++$as_echo_n "checking for fchmodat... " >&6; } ++ if test "${glibcxx_cv_fchmodat+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ++int ++main () ++{ ++fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_fchmodat=yes ++else ++ glibcxx_cv_fchmodat=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ++int ++main () ++{ ++fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_fchmodat=yes ++else ++ glibcxx_cv_fchmodat=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++fi ++ ++ if test $glibcxx_cv_fchmodat = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_FCHMODAT 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmodat" >&5 ++$as_echo "$glibcxx_cv_fchmodat" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile that can copy files" >&5 ++$as_echo_n "checking for sendfile that can copy files... " >&6; } ++ if test "${glibcxx_cv_sendfile+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case "${target_os}" in ++ gnu* | linux* | solaris*) ++ if test x$gcc_no_link = xyes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <sys/sendfile.h> ++int ++main () ++{ ++sendfile(1, 2, (off_t*)NULL, sizeof 1); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ glibcxx_cv_sendfile=yes ++else ++ glibcxx_cv_sendfile=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ if test x$gcc_no_link = xyes; then ++ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <sys/sendfile.h> ++int ++main () ++{ ++sendfile(1, 2, (off_t*)NULL, sizeof 1); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ glibcxx_cv_sendfile=yes ++else ++ glibcxx_cv_sendfile=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ;; ++ *) ++ glibcxx_cv_sendfile=no ++ ;; ++ esac ++ ++fi ++ ++ if test $glibcxx_cv_sendfile = yes; then ++ ++$as_echo "#define _GLIBCXX_USE_SENDFILE 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sendfile" >&5 ++$as_echo "$glibcxx_cv_sendfile" >&6; } ++ CXXFLAGS="$ac_save_CXXFLAGS" ++ ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++ ++ + # Define documentation rules conditionally. + + # See if makeinfo has been installed and is modern enough +@@ -79490,8 +79997,17 @@ + fi + + ++ if test $enable_libstdcxx_filesystem_ts = yes; then ++ ENABLE_FILESYSTEM_TS_TRUE= ++ ENABLE_FILESYSTEM_TS_FALSE='#' ++else ++ ENABLE_FILESYSTEM_TS_TRUE='#' ++ ENABLE_FILESYSTEM_TS_FALSE= ++fi + + ++ ++ + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -79715,7 +80231,7 @@ + # append it here. Only modify Makefiles that have just been created. + # + # Also, get rid of this simulated-VPATH thing that automake does. +-ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile python/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile doc/Makefile po/Makefile testsuite/Makefile" ++ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/filesystem/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile" + + + ac_config_commands="$ac_config_commands generate-headers" +@@ -79914,6 +80430,10 @@ + as_fn_error "conditional \"GLIBCXX_LDBL_COMPAT\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ENABLE_FILESYSTEM_TS_TRUE}" && test -z "${ENABLE_FILESYSTEM_TS_FALSE}"; then ++ as_fn_error "conditional \"ENABLE_FILESYSTEM_TS\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error "conditional \"BUILD_INFO\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +@@ -80932,13 +81452,14 @@ + "doc/xsl/customization.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/customization.xsl" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "libsupc++/Makefile") CONFIG_FILES="$CONFIG_FILES libsupc++/Makefile" ;; +- "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/c++98/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++98/Makefile" ;; + "src/c++11/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++11/Makefile" ;; ++ "src/filesystem/Makefile") CONFIG_FILES="$CONFIG_FILES src/filesystem/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; ++ "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "generate-headers") CONFIG_COMMANDS="$CONFIG_COMMANDS generate-headers" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; +@@ -82738,7 +83259,7 @@ + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; +- "python/Makefile":F) cat > vpsed$$ << \_EOF ++ "src/Makefile":F) cat > vpsed$$ << \_EOF + s!`test -f '$<' || echo '$(srcdir)/'`!! + _EOF + sed -f vpsed$$ $ac_file > tmp$$ +@@ -82749,7 +83270,7 @@ + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; +- "src/Makefile":F) cat > vpsed$$ << \_EOF ++ "src/c++98/Makefile":F) cat > vpsed$$ << \_EOF + s!`test -f '$<' || echo '$(srcdir)/'`!! + _EOF + sed -f vpsed$$ $ac_file > tmp$$ +@@ -82760,7 +83281,7 @@ + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; +- "src/c++98/Makefile":F) cat > vpsed$$ << \_EOF ++ "src/c++11/Makefile":F) cat > vpsed$$ << \_EOF + s!`test -f '$<' || echo '$(srcdir)/'`!! + _EOF + sed -f vpsed$$ $ac_file > tmp$$ +@@ -82771,7 +83292,7 @@ + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; +- "src/c++11/Makefile":F) cat > vpsed$$ << \_EOF ++ "src/filesystem/Makefile":F) cat > vpsed$$ << \_EOF + s!`test -f '$<' || echo '$(srcdir)/'`!! + _EOF + sed -f vpsed$$ $ac_file > tmp$$ +@@ -82815,6 +83336,17 @@ + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; ++ "python/Makefile":F) cat > vpsed$$ << \_EOF ++s!`test -f '$<' || echo '$(srcdir)/'`!! ++_EOF ++ sed -f vpsed$$ $ac_file > tmp$$ ++ mv tmp$$ $ac_file ++ rm vpsed$$ ++ echo 'MULTISUBDIR =' >> $ac_file ++ ml_norecursion=yes ++ . ${multi_basedir}/config-ml.in ++ { ml_norecursion=; unset ml_norecursion;} ++ ;; + "generate-headers":C) (cd include && ${MAKE-make} pch_build= ) ;; + + esac +Index: libstdc++-v3/python/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/python/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/python/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -16,6 +16,23 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -68,6 +85,11 @@ + depcomp = + am__depfiles_maybe = + SOURCES = ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +@@ -89,6 +111,12 @@ + am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ++am__uninstall_files_from_dir = { \ ++ test -z "$$files" \ ++ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ ++ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ ++ $(am__cd) "$$dir" && rm -f $$files; }; \ ++ } + am__installdirs = "$(DESTDIR)$(pythondir)" + DATA = $(nobase_python_DATA) + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ +@@ -345,6 +373,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -362,8 +391,11 @@ + -rm -rf .libs _libs + install-nobase_pythonDATA: $(nobase_python_DATA) + @$(NORMAL_INSTALL) +- test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)" + @list='$(nobase_python_DATA)'; test -n "$(pythondir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \ ++ fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ +@@ -370,7 +402,7 @@ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ +- echo "$(MKDIR_P) '$(DESTDIR)$(pythondir)/$$dir'"; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(pythondir)/$$dir"; }; \ + echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(pythondir)/$$dir'"; \ + $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(pythondir)/$$dir" || exit $$?; }; \ +@@ -380,9 +412,7 @@ + @$(NORMAL_UNINSTALL) + @list='$(nobase_python_DATA)'; test -n "$(pythondir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ +- test -n "$$files" || exit 0; \ +- echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \ +- cd "$(DESTDIR)$(pythondir)" && rm -f $$files ++ dir='$(DESTDIR)$(pythondir)'; $(am__uninstall_files_from_dir) + tags: TAGS + TAGS: + +@@ -406,10 +436,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/python/libstdcxx/v6/printers.py +=================================================================== +--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-5-branch) +@@ -980,6 +980,57 @@ + def display_hint (self): + return 'string' + ++class StdExpPathPrinter: ++ "Print a std::experimental::filesystem::path" ++ ++ def __init__ (self, typename, val): ++ self.val = val ++ start = self.val['_M_cmpts']['_M_impl']['_M_start'] ++ finish = self.val['_M_cmpts']['_M_impl']['_M_finish'] ++ self.num_cmpts = int (finish - start) ++ ++ def _path_type(self): ++ t = str(self.val['_M_type']) ++ if t[-9:] == '_Root_dir': ++ return "root-directory" ++ if t[-10:] == '_Root_name': ++ return "root-name" ++ return None ++ ++ def to_string (self): ++ path = "%s" % self.val ['_M_pathname'] ++ if self.num_cmpts == 0: ++ t = self._path_type() ++ if t: ++ path = '%s [%s]' % (path, t) ++ return "filesystem::path %s" % path ++ ++ class _iterator(Iterator): ++ def __init__(self, cmpts): ++ self.item = cmpts['_M_impl']['_M_start'] ++ self.finish = cmpts['_M_impl']['_M_finish'] ++ self.count = 0 ++ ++ def __iter__(self): ++ return self ++ ++ def __next__(self): ++ if self.item == self.finish: ++ raise StopIteration ++ item = self.item.dereference() ++ count = self.count ++ self.count = self.count + 1 ++ self.item = self.item + 1 ++ path = item['_M_pathname'] ++ t = StdExpPathPrinter(item.type.name, item)._path_type() ++ if not t: ++ t = count ++ return ('[%s]' % t, path) ++ ++ def children(self): ++ return self._iterator(self.val['_M_cmpts']) ++ ++ + # A "regular expression" printer which conforms to the + # "SubPrettyPrinter" protocol from gdb.printing. + class RxPrinter(object): +@@ -1365,6 +1416,11 @@ + 'optional', StdExpOptionalPrinter) + libstdcxx_printer.add_version('std::experimental::fundamentals_v1::', + 'basic_string_view', StdExpStringViewPrinter) ++ # Filesystem TS components ++ libstdcxx_printer.add_version('std::experimental::filesystem::v1::', ++ 'path', StdExpPathPrinter) ++ libstdcxx_printer.add_version('std::experimental::filesystem::v1::__cxx11::', ++ 'path', StdExpPathPrinter) + + # Extensions. + libstdcxx_printer.add_version('__gnu_cxx::', 'slist', StdSlistPrinter) +Index: libstdc++-v3/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,6 +15,23 @@ + + @SET_MAKE@ + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -88,6 +105,11 @@ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive + AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ +@@ -392,7 +414,7 @@ + $(MAKE) $(AM_MAKEFLAGS) all-recursive + + .SUFFIXES: +-am--refresh: ++am--refresh: Makefile + @: + $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps) + @for dep in $?; do \ +@@ -417,6 +439,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +@@ -428,10 +451,8 @@ + $(am__aclocal_m4_deps): + + config.h: stamp-h1 +- @if test ! -f $@; then \ +- rm -f stamp-h1; \ +- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ +- else :; fi ++ @if test ! -f $@; then rm -f stamp-h1; else :; fi ++ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + + stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 +@@ -590,10 +611,15 @@ + + installcheck: installcheck-recursive + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/scripts/testsuite_flags.in +=================================================================== +--- a/src/libstdc++-v3/scripts/testsuite_flags.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/scripts/testsuite_flags.in (.../branches/gcc-5-branch) +@@ -77,7 +77,8 @@ + echo ${PCHFLAGS} + ;; + --cxxldflags) +- SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@" ++ SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@ ++ -L${BUILD_DIR}/src/filesystem/.libs" + echo ${SECTIONLDFLAGS} + ;; + *) +Index: libstdc++-v3/src/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/src/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -16,6 +16,23 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -86,6 +103,12 @@ + am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ++am__uninstall_files_from_dir = { \ ++ test -z "$$files" \ ++ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ ++ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ ++ $(am__cd) "$$dir" && rm -f $$files; }; \ ++ } + am__installdirs = "$(DESTDIR)$(toolexeclibdir)" + LTLIBRARIES = $(toolexeclib_LTLIBRARIES) + am__DEPENDENCIES_1 = +@@ -117,6 +140,11 @@ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive + AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ +@@ -123,7 +151,7 @@ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = $(SUBDIRS) ++DIST_SUBDIRS = c++98 c++11 filesystem + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ + ACLOCAL = @ACLOCAL@ + ALLOCATOR_H = @ALLOCATOR_H@ +@@ -346,7 +374,9 @@ + + # -I/-D flags to pass when compiling. + AM_CPPFLAGS = $(GLIBCXX_INCLUDES) +-SUBDIRS = c++98 c++11 ++@ENABLE_FILESYSTEM_TS_FALSE@filesystem_dir = ++@ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem ++SUBDIRS = c++98 c++11 $(filesystem_dir) + @VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la + + # Cross compiler support. +@@ -529,6 +559,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -540,7 +571,6 @@ + $(am__aclocal_m4_deps): + install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" + @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ +@@ -548,6 +578,8 @@ + else :; fi; \ + done; \ + test -z "$$list2" || { \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ + } +@@ -569,9 +601,9 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) ++libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) $(EXTRA_libstdc___la_DEPENDENCIES) + $(libstdc___la_LINK) $(am_libstdc___la_rpath) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) +-libvtv.la: $(libvtv_la_OBJECTS) $(libvtv_la_DEPENDENCIES) ++libvtv.la: $(libvtv_la_OBJECTS) $(libvtv_la_DEPENDENCIES) $(EXTRA_libvtv_la_DEPENDENCIES) + $(libvtv_la_LINK) $(am_libvtv_la_rpath) $(libvtv_la_OBJECTS) $(libvtv_la_LIBADD) $(LIBS) + + mostlyclean-compile: +@@ -747,10 +779,15 @@ + + installcheck: installcheck-recursive + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +@@ -859,6 +896,7 @@ + + vpath % $(top_srcdir)/src/c++98 + vpath % $(top_srcdir)/src/c++11 ++@ENABLE_FILESYSTEM_TS_TRUE@vpath % $(top_srcdir)/src/filesystem + + # Use special rules for compatibility-ldbl.cc compilation, as we need to + # pass -mlong-double-64. +Index: libstdc++-v3/src/filesystem/path.cc +=================================================================== +--- a/src/libstdc++-v3/src/filesystem/path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/filesystem/path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,471 @@ ++// Class filesystem::path -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++#include <experimental/filesystem> ++ ++using std::experimental::filesystem::path; ++ ++std::experimental::filesystem::filesystem_error::~filesystem_error() = default; ++ ++constexpr path::value_type path::preferred_separator; ++ ++path& ++path::remove_filename() ++{ ++ if (_M_type == _Type::_Multi) ++ { ++ if (!_M_cmpts.empty()) ++ { ++ auto cmpt = std::prev(_M_cmpts.end()); ++ _M_pathname.erase(cmpt->_M_pos); ++ _M_cmpts.erase(cmpt); ++ _M_trim(); ++ } ++ } ++ else ++ clear(); ++ return *this; ++} ++ ++path& ++path::replace_filename(const path& replacement) ++{ ++ remove_filename(); ++ operator/=(replacement); ++ return *this; ++} ++ ++path& ++path::replace_extension(const path& replacement) ++{ ++ auto ext = _M_find_extension(); ++ if (ext.first && ext.second != string_type::npos) ++ { ++ if (ext.first == &_M_pathname) ++ _M_pathname.erase(ext.second); ++ else ++ { ++ const auto& back = _M_cmpts.back(); ++ if (ext.first != &back._M_pathname) ++ _GLIBCXX_THROW_OR_ABORT( ++ std::logic_error("path::replace_extension failed")); ++ _M_pathname.erase(back._M_pos + ext.second); ++ } ++ } ++ if (!replacement.empty() && replacement.native()[0] != '.') ++ _M_pathname += '.'; ++ _M_pathname += replacement.native(); ++ _M_split_cmpts(); ++ return *this; ++} ++ ++namespace ++{ ++ template<typename Iter1, typename Iter2> ++ int do_compare(Iter1 begin1, Iter1 end1, Iter2 begin2, Iter2 end2) ++ { ++ int cmpt = 1; ++ while (begin1 != end1 && begin2 != end2) ++ { ++ if (begin1->native() < begin2->native()) ++ return -cmpt; ++ if (begin1->native() > begin2->native()) ++ return +cmpt; ++ ++begin1; ++ ++begin2; ++ ++cmpt; ++ } ++ if (begin1 == end1) ++ { ++ if (begin2 == end2) ++ return 0; ++ return -cmpt; ++ } ++ return +cmpt; ++ } ++} ++ ++int ++path::compare(const path& p) const noexcept ++{ ++ struct CmptRef ++ { ++ const path* ptr; ++ const string_type& native() const noexcept { return ptr->native(); } ++ }; ++ ++ if (_M_type == _Type::_Multi && p._M_type == _Type::_Multi) ++ return do_compare(_M_cmpts.begin(), _M_cmpts.end(), ++ p._M_cmpts.begin(), p._M_cmpts.end()); ++ else if (_M_type == _Type::_Multi) ++ { ++ CmptRef c[1] = { { &p } }; ++ return do_compare(_M_cmpts.begin(), _M_cmpts.end(), c, c+1); ++ } ++ else if (p._M_type == _Type::_Multi) ++ { ++ CmptRef c[1] = { { this } }; ++ return do_compare(c, c+1, p._M_cmpts.begin(), p._M_cmpts.end()); ++ } ++ else ++ return _M_pathname.compare(p._M_pathname); ++} ++ ++path ++path::root_name() const ++{ ++ path __ret; ++ if (_M_type == _Type::_Root_name) ++ __ret = *this; ++ else if (_M_cmpts.size() && _M_cmpts.begin()->_M_type == _Type::_Root_name) ++ __ret = *_M_cmpts.begin(); ++ return __ret; ++} ++ ++path ++path::root_directory() const ++{ ++ path __ret; ++ if (_M_type == _Type::_Root_dir) ++ __ret = *this; ++ else if (!_M_cmpts.empty()) ++ { ++ auto __it = _M_cmpts.begin(); ++ if (__it->_M_type == _Type::_Root_name) ++ ++__it; ++ if (__it != _M_cmpts.end() && __it->_M_type == _Type::_Root_dir) ++ __ret = *__it; ++ } ++ return __ret; ++} ++ ++ ++path ++path::root_path() const ++{ ++ path __ret; ++ if (_M_type == _Type::_Root_name || _M_type == _Type::_Root_dir) ++ __ret = *this; ++ else if (!_M_cmpts.empty()) ++ { ++ auto __it = _M_cmpts.begin(); ++ if (__it->_M_type == _Type::_Root_name) ++ { ++ __ret = *__it++; ++ if (__it != _M_cmpts.end() && __it->_M_type == _Type::_Root_dir) ++ { ++ __ret._M_pathname += preferred_separator; ++ __ret._M_split_cmpts(); ++ } ++ } ++ else if (__it->_M_type == _Type::_Root_dir) ++ __ret = *__it; ++ } ++ return __ret; ++} ++ ++path ++path::relative_path() const ++{ ++ path __ret; ++ if (_M_type == _Type::_Filename) ++ __ret = *this; ++ else if (!_M_cmpts.empty()) ++ { ++ auto __it = _M_cmpts.begin(); ++ if (__it->_M_type == _Type::_Root_name) ++ ++__it; ++ if (__it != _M_cmpts.end() && __it->_M_type == _Type::_Root_dir) ++ ++__it; ++ if (__it != _M_cmpts.end()) ++ __ret.assign(_M_pathname.substr(__it->_M_pos)); ++ } ++ return __ret; ++} ++ ++path ++path::parent_path() const ++{ ++ path __ret; ++ if (_M_cmpts.size() < 2) ++ return __ret; ++ for (auto __it = _M_cmpts.begin(), __end = std::prev(_M_cmpts.end()); ++ __it != __end; ++__it) ++ { ++ __ret /= *__it; ++ } ++ return __ret; ++} ++ ++bool ++path::has_root_name() const ++{ ++ if (_M_type == _Type::_Root_name) ++ return true; ++ if (!_M_cmpts.empty() && _M_cmpts.begin()->_M_type == _Type::_Root_name) ++ return true; ++ return false; ++} ++ ++bool ++path::has_root_directory() const ++{ ++ if (_M_type == _Type::_Root_dir) ++ return true; ++ if (!_M_cmpts.empty()) ++ { ++ auto __it = _M_cmpts.begin(); ++ if (__it->_M_type == _Type::_Root_name) ++ ++__it; ++ if (__it != _M_cmpts.end() && __it->_M_type == _Type::_Root_dir) ++ return true; ++ } ++ return false; ++} ++ ++bool ++path::has_root_path() const ++{ ++ if (_M_type == _Type::_Root_name || _M_type == _Type::_Root_dir) ++ return true; ++ if (!_M_cmpts.empty()) ++ { ++ auto __type = _M_cmpts.front()._M_type; ++ if (__type == _Type::_Root_name || __type == _Type::_Root_dir) ++ return true; ++ } ++ return false; ++} ++ ++bool ++path::has_relative_path() const ++{ ++ if (_M_type == _Type::_Filename) ++ return true; ++ if (!_M_cmpts.empty()) ++ { ++ auto __it = _M_cmpts.begin(); ++ if (__it->_M_type == _Type::_Root_name) ++ ++__it; ++ if (__it != _M_cmpts.end() && __it->_M_type == _Type::_Root_dir) ++ ++__it; ++ if (__it != _M_cmpts.end()) ++ return true; ++ } ++ return false; ++} ++ ++ ++bool ++path::has_parent_path() const ++{ ++ return _M_cmpts.size() > 1; ++} ++ ++bool ++path::has_filename() const ++{ ++ return !empty(); ++} ++ ++std::pair<const path::string_type*, std::size_t> ++path::_M_find_extension() const ++{ ++ const std::string* s = nullptr; ++ ++ if (_M_type != _Type::_Multi) ++ s = &_M_pathname; ++ else if (!_M_cmpts.empty()) ++ { ++ const auto& c = _M_cmpts.back(); ++ if (c._M_type == _Type::_Filename) ++ s = &c._M_pathname; ++ } ++ ++ if (s) ++ { ++ if (auto sz = s->size()) ++ { ++ if (sz <= 2 && (*s)[0] == '.') ++ { ++ if (sz == 1 || (*s)[1] == '.') // filename is "." or ".." ++ return { s, string_type::npos }; ++ else ++ return { s, 0 }; // filename is like ".?" ++ } ++ return { s, s->rfind('.') }; ++ } ++ } ++ return {}; ++} ++ ++void ++path::_M_split_cmpts() ++{ ++ _M_type = _Type::_Multi; ++ _M_cmpts.clear(); ++ ++ if (_M_pathname.empty()) ++ return; ++ ++ size_t pos = 0; ++ const size_t len = _M_pathname.size(); ++ ++ // look for root name or root directory ++ if (_S_is_dir_sep(_M_pathname[0])) ++ { ++ // look for root name, such as "//" or "//foo" ++ if (len > 1 && _M_pathname[1] == _M_pathname[0]) ++ { ++ if (len == 2) ++ { ++ // entire path is just "//" ++ _M_type = _Type::_Root_name; ++ return; ++ } ++ ++ if (!_S_is_dir_sep(_M_pathname[2])) ++ { ++ // got root name, find its end ++ pos = 3; ++ while (pos < len && !_S_is_dir_sep(_M_pathname[pos])) ++ ++pos; ++ _M_add_root_name(pos); ++ if (pos < len) // also got root directory ++ _M_add_root_dir(pos); ++ } ++ else ++ { ++ // got something like "///foo" which is just a root directory ++ // composed of multiple redundant directory separators ++ _M_add_root_dir(0); ++ } ++ } ++ else // got root directory ++ _M_add_root_dir(0); ++ ++pos; ++ } ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ else if (len > 1 && _M_pathname[1] == L':') ++ { ++ // got disk designator ++ _M_add_root_name(2); ++ if (len > 2 && _S_is_dir_sep(_M_pathname[2])) ++ _M_add_root_dir(2); ++ pos = 2; ++ } ++#endif ++ ++ size_t back = pos; ++ while (pos < len) ++ { ++ if (_S_is_dir_sep(_M_pathname[pos])) ++ { ++ if (back != pos) ++ _M_add_filename(back, pos - back); ++ back = ++pos; ++ } ++ else ++ ++pos; ++ } ++ ++ if (back != pos) ++ _M_add_filename(back, pos - back); ++ else if (_S_is_dir_sep(_M_pathname.back())) ++ { ++ // [path.itr]/8 ++ // "Dot, if one or more trailing non-root slash characters are present." ++ if (_M_cmpts.back()._M_type == _Type::_Filename) ++ { ++ const auto& last = _M_cmpts.back(); ++ pos = last._M_pos + last._M_pathname.size(); ++ _M_cmpts.emplace_back(string_type(1, '.'), _Type::_Filename, pos); ++ } ++ } ++ ++ _M_trim(); ++} ++ ++void ++path::_M_add_root_name(size_t n) ++{ ++ _M_cmpts.emplace_back(_M_pathname.substr(0, n), _Type::_Root_name, 0); ++} ++ ++void ++path::_M_add_root_dir(size_t pos) ++{ ++ _M_cmpts.emplace_back(_M_pathname.substr(pos, 1), _Type::_Root_dir, pos); ++} ++ ++void ++path::_M_add_filename(size_t pos, size_t n) ++{ ++ _M_cmpts.emplace_back(_M_pathname.substr(pos, n), _Type::_Filename, pos); ++} ++ ++void ++path::_M_trim() ++{ ++ if (_M_cmpts.size() == 1) ++ { ++ _M_type = _M_cmpts.front()._M_type; ++ _M_cmpts.clear(); ++ } ++} ++ ++path::string_type ++path::_S_convert_loc(const char* __first, const char* __last, ++ const std::locale& __loc) ++{ ++ auto& __cvt = std::use_facet<codecvt<wchar_t, char, mbstate_t>>(__loc); ++ basic_string<wchar_t> __ws; ++ if (!__str_codecvt_in(__first, __last, __ws, __cvt)) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ return __ws; ++#else ++ return _Cvt<wchar_t>::_S_convert(__ws.data(), __ws.data() + __ws.size()); ++#endif ++} ++ ++std::size_t ++std::experimental::filesystem::hash_value(const path& p) noexcept ++{ ++ // [path.non-member] ++ // "If for two paths, p1 == p2 then hash_value(p1) == hash_value(p2)." ++ // Equality works as if by traversing the range [begin(), end()), meaning ++ // e.g. path("a//b") == path("a/b"), so we cannot simply hash _M_pathname ++ // but need to iterate over individual elements. Use the hash_combine from ++ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3876.pdf ++ size_t seed = 0; ++ for (const auto& x : p) ++ { ++ seed ^= std::hash<path::string_type>()(x.native()) + 0x9e3779b9 ++ + (seed<<6) + (seed>>2); ++ } ++ return seed; ++} +Index: libstdc++-v3/src/filesystem/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/src/filesystem/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/filesystem/Makefile.in (.../branches/gcc-5-branch) +@@ -0,0 +1,696 @@ ++# Makefile.in generated by automake 1.11.6 from Makefile.am. ++# @configure_input@ ++ ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkglibexecdir = $(libexecdir)/@PACKAGE@ ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = @build@ ++host_triplet = @host@ ++target_triplet = @target@ ++DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \ ++ $(srcdir)/Makefile.am ++subdir = src/filesystem ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ ++ $(top_srcdir)/../config/enable.m4 \ ++ $(top_srcdir)/../config/futex.m4 \ ++ $(top_srcdir)/../config/iconv.m4 \ ++ $(top_srcdir)/../config/lead-dot.m4 \ ++ $(top_srcdir)/../config/lib-ld.m4 \ ++ $(top_srcdir)/../config/lib-link.m4 \ ++ $(top_srcdir)/../config/lib-prefix.m4 \ ++ $(top_srcdir)/../config/lthostflags.m4 \ ++ $(top_srcdir)/../config/multi.m4 \ ++ $(top_srcdir)/../config/no-executables.m4 \ ++ $(top_srcdir)/../config/override.m4 \ ++ $(top_srcdir)/../config/stdint.m4 \ ++ $(top_srcdir)/../config/unwind_ipinfo.m4 \ ++ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ ++ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ ++ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ ++ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ ++ $(top_srcdir)/../config/gc++filt.m4 \ ++ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \ ++ $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++CONFIG_HEADER = $(top_builddir)/config.h ++CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_VPATH_FILES = ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; ++am__install_max = 40 ++am__nobase_strip_setup = \ ++ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` ++am__nobase_strip = \ ++ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" ++am__nobase_list = $(am__nobase_strip_setup); \ ++ for p in $$list; do echo "$$p $$p"; done | \ ++ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ ++ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ ++ if (++n[$$2] == $(am__install_max)) \ ++ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ ++ END { for (dir in files) print dir, files[dir] }' ++am__base_list = \ ++ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ ++ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ++am__uninstall_files_from_dir = { \ ++ test -z "$$files" \ ++ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ ++ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ ++ $(am__cd) "$$dir" && rm -f $$files; }; \ ++ } ++am__installdirs = "$(DESTDIR)$(toolexeclibdir)" ++LTLIBRARIES = $(toolexeclib_LTLIBRARIES) ++libstdc__fs_la_LIBADD = ++am__objects_1 = dir.lo ops.lo path.lo ++am_libstdc__fs_la_OBJECTS = $(am__objects_1) ++libstdc__fs_la_OBJECTS = $(am_libstdc__fs_la_OBJECTS) ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) ++depcomp = ++am__depfiles_maybe = ++CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) ++CXXLD = $(CXX) ++SOURCES = $(libstdc__fs_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac ++ETAGS = etags ++CTAGS = ctags ++ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ++ACLOCAL = @ACLOCAL@ ++ALLOCATOR_H = @ALLOCATOR_H@ ++ALLOCATOR_NAME = @ALLOCATOR_NAME@ ++AMTAR = @AMTAR@ ++AR = @AR@ ++AS = @AS@ ++ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@ ++ATOMIC_FLAGS = @ATOMIC_FLAGS@ ++ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ ++BASIC_FILE_CC = @BASIC_FILE_CC@ ++BASIC_FILE_H = @BASIC_FILE_H@ ++CC = @CC@ ++CCODECVT_CC = @CCODECVT_CC@ ++CCOLLATE_CC = @CCOLLATE_CC@ ++CCTYPE_CC = @CCTYPE_CC@ ++CFLAGS = @CFLAGS@ ++CLOCALE_CC = @CLOCALE_CC@ ++CLOCALE_H = @CLOCALE_H@ ++CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@ ++CMESSAGES_CC = @CMESSAGES_CC@ ++CMESSAGES_H = @CMESSAGES_H@ ++CMONEY_CC = @CMONEY_CC@ ++CNUMERIC_CC = @CNUMERIC_CC@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@ ++CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@ ++CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@ ++CSTDIO_H = @CSTDIO_H@ ++CTIME_CC = @CTIME_CC@ ++CTIME_H = @CTIME_H@ ++CXX = @CXX@ ++CXXCPP = @CXXCPP@ ++CXXFILT = @CXXFILT@ ++CXXFLAGS = @CXXFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++C_INCLUDE_DIR = @C_INCLUDE_DIR@ ++DBLATEX = @DBLATEX@ ++DEBUG_FLAGS = @DEBUG_FLAGS@ ++DEFS = @DEFS@ ++DOT = @DOT@ ++DOXYGEN = @DOXYGEN@ ++DSYMUTIL = @DSYMUTIL@ ++DUMPBIN = @DUMPBIN@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@ ++EXEEXT = @EXEEXT@ ++EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ ++FGREP = @FGREP@ ++GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ ++GLIBCXX_LIBS = @GLIBCXX_LIBS@ ++GREP = @GREP@ ++HWCAP_FLAGS = @HWCAP_FLAGS@ ++INSTALL = @INSTALL@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++LD = @LD@ ++LDFLAGS = @LDFLAGS@ ++LIBICONV = @LIBICONV@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LIBTOOL = @LIBTOOL@ ++LIPO = @LIPO@ ++LN_S = @LN_S@ ++LTLIBICONV = @LTLIBICONV@ ++LTLIBOBJS = @LTLIBOBJS@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ ++MKDIR_P = @MKDIR_P@ ++NM = @NM@ ++NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ ++OBJEXT = @OBJEXT@ ++OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ ++OPT_LDFLAGS = @OPT_LDFLAGS@ ++OS_INC_SRCDIR = @OS_INC_SRCDIR@ ++OTOOL = @OTOOL@ ++OTOOL64 = @OTOOL64@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++PDFLATEX = @PDFLATEX@ ++RANLIB = @RANLIB@ ++SECTION_FLAGS = @SECTION_FLAGS@ ++SECTION_LDFLAGS = @SECTION_LDFLAGS@ ++SED = @SED@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++SYMVER_FILE = @SYMVER_FILE@ ++TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ ++USE_NLS = @USE_NLS@ ++VERSION = @VERSION@ ++VTV_CXXFLAGS = @VTV_CXXFLAGS@ ++VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ ++VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ ++WARN_FLAGS = @WARN_FLAGS@ ++WERROR = @WERROR@ ++XMLLINT = @XMLLINT@ ++XSLTPROC = @XSLTPROC@ ++XSL_STYLE_DIR = @XSL_STYLE_DIR@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_CXX = @ac_ct_CXX@ ++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ++am__leading_dot = @am__leading_dot@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ ++baseline_dir = @baseline_dir@ ++baseline_subdir_switch = @baseline_subdir_switch@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++builddir = @builddir@ ++check_msgfmt = @check_msgfmt@ ++datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ ++enable_shared = @enable_shared@ ++enable_static = @enable_static@ ++exec_prefix = @exec_prefix@ ++glibcxx_MOFILES = @glibcxx_MOFILES@ ++glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@ ++glibcxx_POFILES = @glibcxx_POFILES@ ++glibcxx_builddir = @glibcxx_builddir@ ++glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@ ++glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@ ++glibcxx_cxx98_abi = @glibcxx_cxx98_abi@ ++glibcxx_localedir = @glibcxx_localedir@ ++glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@ ++glibcxx_prefixdir = @glibcxx_prefixdir@ ++glibcxx_srcdir = @glibcxx_srcdir@ ++glibcxx_toolexecdir = @glibcxx_toolexecdir@ ++glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@ ++gxx_include_dir = @gxx_include_dir@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++htmldir = @htmldir@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++libtool_VERSION = @libtool_VERSION@ ++localedir = @localedir@ ++localstatedir = @localstatedir@ ++lt_host_flags = @lt_host_flags@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++multi_basedir = @multi_basedir@ ++oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ ++port_specific_symbol_files = @port_specific_symbol_files@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++psdir = @psdir@ ++python_mod_dir = @python_mod_dir@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ ++thread_header = @thread_header@ ++top_build_prefix = @top_build_prefix@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ ++toplevel_builddir = @toplevel_builddir@ ++toplevel_srcdir = @toplevel_srcdir@ ++ ++# May be used by various substitution variables. ++gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) ++MAINT_CHARSET = latin1 ++mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs ++PWD_COMMAND = $${PWDCMD-pwd} ++STAMP = echo timestamp > ++toolexecdir = $(glibcxx_toolexecdir) ++toolexeclibdir = $(glibcxx_toolexeclibdir) ++@ENABLE_WERROR_FALSE@WERROR_FLAG = ++@ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) ++@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = ++@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates ++ ++# These bits are all figured out from configure. Look in acinclude.m4 ++# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. ++CONFIG_CXXFLAGS = \ ++ $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ ++ ++WARN_CXXFLAGS = \ ++ $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once ++ ++ ++# -I/-D flags to pass when compiling. ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++toolexeclib_LTLIBRARIES = libstdc++fs.la ++headers = ++sources = \ ++ dir.cc \ ++ ops.cc \ ++ path.cc ++ ++ ++# vpath % $(top_srcdir)/src/filesystem ++libstdc__fs_la_SOURCES = $(sources) ++ ++# AM_CXXFLAGS needs to be in each subdirectory so that it can be ++# modified in a per-library or per-sub-library way. Need to manually ++# set this option because CONFIG_CXXFLAGS has to be after ++# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden ++# as the occasion call for it. ++AM_CXXFLAGS = \ ++ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ ++ -std=gnu++14 \ ++ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) ++ ++AM_MAKEFLAGS = \ ++ "gxx_include_dir=$(gxx_include_dir)" ++ ++ ++# Libtool notes ++ ++# 1) In general, libtool expects an argument such as `--tag=CXX' when ++# using the C++ compiler, because that will enable the settings ++# detected when C++ support was being configured. However, when no ++# such flag is given in the command line, libtool attempts to figure ++# it out by matching the compiler name in each configuration section ++# against a prefix of the command line. The problem is that, if the ++# compiler name and its initial flags stored in the libtool ++# configuration file don't match those in the command line, libtool ++# can't decide which configuration to use, and it gives up. The ++# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe ++# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to ++# attempt to infer which configuration to use. ++# ++# The second tag argument, `--tag disable-shared` means that libtool ++# only compiles each source once, for static objects. In actuality, ++# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to ++# the libtool command that is used create the object, which is ++# suitable for shared libraries. The `--tag disable-shared` must be ++# placed after --tag CXX lest things CXX undo the affect of ++# disable-shared. ++ ++# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is ++# last. (That way, things like -O2 passed down from the toplevel can ++# be overridden by --enable-debug.) ++LTCXXCOMPILE = \ ++ $(LIBTOOL) --tag CXX --tag disable-shared \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS) ++ ++LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) ++ ++# 3) We'd have a problem when building the shared libstdc++ object if ++# the rules automake generates would be used. We cannot allow g++ to ++# be used since this would add -lstdc++ to the link line which of ++# course is problematic at this point. So, we get the top-level ++# directory to configure libstdc++-v3 to use gcc as the C++ ++# compilation driver. ++CXXLINK = \ ++ $(LIBTOOL) --tag CXX --tag disable-shared \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CXX) \ ++ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ ++ ++ ++# By adding these files here, automake will remove them for 'make clean' ++CLEANFILES = stamp-* ++all: all-am ++ ++.SUFFIXES: ++.SUFFIXES: .cc .lo .o .obj ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps src/filesystem/Makefile'; \ ++ $(am__cd) $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign --ignore-deps src/filesystem/Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ esac; ++$(top_srcdir)/fragment.am: ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(am__aclocal_m4_deps): ++install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) ++ @$(NORMAL_INSTALL) ++ @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ ++ list2=; for p in $$list; do \ ++ if test -f $$p; then \ ++ list2="$$list2 $$p"; \ ++ else :; fi; \ ++ done; \ ++ test -z "$$list2" || { \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ ++ } ++ ++uninstall-toolexeclibLTLIBRARIES: ++ @$(NORMAL_UNINSTALL) ++ @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ ++ for p in $$list; do \ ++ $(am__strip_dir) \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$f'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$f"; \ ++ done ++ ++clean-toolexeclibLTLIBRARIES: ++ -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES) ++ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ ++ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ ++ test "$$dir" != "$$p" || dir=.; \ ++ echo "rm -f \"$${dir}/so_locations\""; \ ++ rm -f "$${dir}/so_locations"; \ ++ done ++libstdc++fs.la: $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_DEPENDENCIES) $(EXTRA_libstdc__fs_la_DEPENDENCIES) ++ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_LIBADD) $(LIBS) ++ ++mostlyclean-compile: ++ -rm -f *.$(OBJEXT) ++ ++distclean-compile: ++ -rm -f *.tab.c ++ ++.cc.o: ++ $(CXXCOMPILE) -c -o $@ $< ++ ++.cc.obj: ++ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++ ++.cc.lo: ++ $(LTCXXCOMPILE) -c -o $@ $< ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ mkid -fID $$unique ++tags: TAGS ++ ++TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ set x; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ shift; \ ++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ if test $$# -gt 0; then \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ "$$@" $$unique; \ ++ else \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$unique; \ ++ fi; \ ++ fi ++ctags: CTAGS ++CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ test -z "$(CTAGS_ARGS)$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && $(am__cd) $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) "$$here" ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++check-am: all-am ++check: check-am ++all-am: Makefile $(LTLIBRARIES) ++installdirs: ++ for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done ++install: install-am ++install-exec: install-exec-am ++install-data: install-data-am ++uninstall: uninstall-am ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-am ++install-strip: ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi ++mostlyclean-generic: ++ ++clean-generic: ++ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ++ ++distclean-generic: ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-am ++ ++clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ ++ mostlyclean-am ++ ++distclean: distclean-am ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-tags ++ ++dvi: dvi-am ++ ++dvi-am: ++ ++html: html-am ++ ++html-am: ++ ++info: info-am ++ ++info-am: ++ ++install-data-am: ++ ++install-dvi: install-dvi-am ++ ++install-dvi-am: ++ ++install-exec-am: install-toolexeclibLTLIBRARIES ++ ++install-html: install-html-am ++ ++install-html-am: ++ ++install-info: install-info-am ++ ++install-info-am: ++ ++install-man: ++ ++install-pdf: install-pdf-am ++ ++install-pdf-am: ++ ++install-ps: install-ps-am ++ ++install-ps-am: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-am ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-am ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic \ ++ mostlyclean-libtool ++ ++pdf: pdf-am ++ ++pdf-am: ++ ++ps: ps-am ++ ++ps-am: ++ ++uninstall-am: uninstall-toolexeclibLTLIBRARIES ++ ++.MAKE: install-am install-strip ++ ++.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ ++ clean-libtool clean-toolexeclibLTLIBRARIES ctags distclean \ ++ distclean-compile distclean-generic distclean-libtool \ ++ distclean-tags dvi dvi-am html html-am info info-am install \ ++ install-am install-data install-data-am install-dvi \ ++ install-dvi-am install-exec install-exec-am install-html \ ++ install-html-am install-info install-info-am install-man \ ++ install-pdf install-pdf-am install-ps install-ps-am \ ++ install-strip install-toolexeclibLTLIBRARIES installcheck \ ++ installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags uninstall uninstall-am uninstall-toolexeclibLTLIBRARIES ++ ++ ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: +Index: libstdc++-v3/src/filesystem/dir.cc +=================================================================== +--- a/src/libstdc++-v3/src/filesystem/dir.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/filesystem/dir.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,403 @@ ++// Class filesystem::directory_entry etc. -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++#include <experimental/filesystem> ++#include <utility> ++#include <stack> ++#include <string.h> ++#include <errno.h> ++#ifdef _GLIBCXX_HAVE_DIRENT_H ++# ifdef _GLIBCXX_HAVE_SYS_TYPES_H ++# include <sys/types.h> ++# endif ++# include <dirent.h> ++#else ++# error "the <dirent.h> header is needed to build the Filesystem TS" ++#endif ++ ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# undef opendir ++# define opendir _wopendir ++#endif ++ ++namespace fs = std::experimental::filesystem; ++ ++namespace ++{ ++ struct ErrorCode ++ { ++ ErrorCode(std::error_code* p) : ec(p) { } ++ ++ ErrorCode(ErrorCode&& e) : ec(std::exchange(e.ec, nullptr)) { } ++ ++ ~ErrorCode() { if (ec) ec->clear(); } ++ ++ void assign(int err) ++ { ++ ec->assign(err, std::generic_category()); ++ ec = nullptr; ++ } ++ ++ explicit operator bool() { return ec != nullptr; } ++ ++ std::error_code* ec; ++ }; ++} ++ ++struct fs::_Dir ++{ ++ _Dir() : dirp(nullptr) { } ++ ++ _Dir(DIR* dirp, const fs::path& path) : dirp(dirp), path(path) { } ++ ++ _Dir(_Dir&& d) ++ : dirp(std::exchange(d.dirp, nullptr)), path(std::move(d.path)), ++ entry(std::move(d.entry)), type(d.type) ++ { } ++ ++ _Dir& operator=(_Dir&&) = delete; ++ ++ ~_Dir() { if (dirp) ::closedir(dirp); } ++ ++ bool advance(ErrorCode); ++ ++ DIR* dirp; ++ fs::path path; ++ directory_entry entry; ++ file_type type = file_type::none; ++}; ++ ++namespace ++{ ++ template<typename Bitmask> ++ inline bool is_set(Bitmask obj, Bitmask bits) ++ { ++ return (obj & bits) != Bitmask::none; ++ } ++ ++ fs::_Dir ++ opendir(const fs::path& p, fs::directory_options options, ErrorCode ec) ++ { ++ if (DIR* dirp = ::opendir(p.c_str())) ++ return {dirp, p}; ++ ++ const int err = errno; ++ if (err == EACCES ++ && is_set(options, fs::directory_options::skip_permission_denied)) ++ return {}; ++ ++ if (!ec) ++ _GLIBCXX_THROW_OR_ABORT(fs::filesystem_error( ++ "directory iterator cannot open directory", p, ++ std::error_code(err, std::generic_category()))); ++ ++ ec.assign(err); ++ return {}; ++ } ++ ++ inline std::shared_ptr<fs::_Dir> ++ make_shared_dir(fs::_Dir&& dir) ++ { ++ if (dir.dirp) ++ return std::make_shared<fs::_Dir>(std::move(dir)); ++ return {}; ++ } ++ ++ inline fs::file_type ++ get_file_type(const dirent& d __attribute__((__unused__))) ++ { ++#ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE ++ switch (d.d_type) ++ { ++ case DT_BLK: ++ return fs::file_type::block; ++ case DT_CHR: ++ return fs::file_type::character; ++ case DT_DIR: ++ return fs::file_type::directory; ++ case DT_FIFO: ++ return fs::file_type::fifo; ++ case DT_LNK: ++ return fs::file_type::symlink; ++ case DT_REG: ++ return fs::file_type::regular; ++ case DT_SOCK: ++ return fs::file_type::socket; ++ case DT_UNKNOWN: ++ return fs::file_type::unknown; ++ default: ++ return fs::file_type::none; ++ } ++#else ++ return fs::file_type::none; ++#endif ++ } ++ ++ int ++ native_readdir(DIR* dirp, ::dirent*& entryp) ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ errno = 0; ++ if ((entryp = ::readdir(dirp))) ++ return 0; ++ return errno; ++#else ++ return ::readdir_r(dirp, entryp, &entryp); ++#endif ++ } ++} ++ ++bool ++fs::_Dir::advance(ErrorCode ec) ++{ ++ ::dirent ent; ++ ::dirent* result = &ent; ++ if (int err = native_readdir(dirp, result)) ++ { ++ if (!ec) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "directory iterator cannot advance", ++ std::error_code(err, std::generic_category()))); ++ ec.assign(err); ++ return true; ++ } ++ else if (result != nullptr) ++ { ++ // skip past dot and dot-dot ++ if (!strcmp(ent.d_name, ".") || !strcmp(ent.d_name, "..")) ++ return advance(std::move(ec)); ++ entry = fs::directory_entry{path / ent.d_name}; ++ type = get_file_type(ent); ++ return true; ++ } ++ else ++ { ++ // reached the end ++ entry = {}; ++ type = fs::file_type::none; ++ return false; ++ } ++} ++ ++fs::directory_iterator:: ++directory_iterator(const path& p, directory_options options, error_code* ec) ++: directory_iterator(make_shared_dir(opendir(p, options, ec)), ec) ++{ } ++ ++fs::directory_iterator:: ++directory_iterator(std::shared_ptr<_Dir> dir, error_code* ec) ++: _M_dir(std::move(dir)) ++{ ++ if (_M_dir && !_M_dir->advance(ec)) ++ _M_dir.reset(); ++} ++ ++const fs::directory_entry& ++fs::directory_iterator::operator*() const ++{ ++ if (!_M_dir) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "non-dereferenceable directory iterator", ++ std::make_error_code(errc::invalid_argument))); ++ return _M_dir->entry; ++} ++ ++fs::directory_iterator& ++fs::directory_iterator::operator++() ++{ ++ if (!_M_dir) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "cannot advance non-dereferenceable directory iterator", ++ std::make_error_code(errc::invalid_argument))); ++ if (!_M_dir->advance(nullptr)) ++ _M_dir.reset(); ++ return *this; ++} ++ ++fs::directory_iterator& ++fs::directory_iterator::increment(error_code& ec) noexcept ++{ ++ if (!_M_dir) ++ { ++ ec = std::make_error_code(errc::invalid_argument); ++ return *this; ++ } ++ if (!_M_dir->advance(&ec)) ++ _M_dir.reset(); ++ return *this; ++} ++ ++using Dir_iter_pair = std::pair<fs::_Dir, fs::directory_iterator>; ++ ++struct fs::recursive_directory_iterator::_Dir_stack : std::stack<_Dir> ++{ ++ void clear() { c.clear(); } ++}; ++ ++fs::recursive_directory_iterator:: ++recursive_directory_iterator(const path& p, directory_options options, ++ error_code* ec) ++: _M_options(options), _M_pending(true) ++{ ++ if (DIR* dirp = ::opendir(p.c_str())) ++ { ++ _M_dirs = std::make_shared<_Dir_stack>(); ++ _M_dirs->push(_Dir{ dirp, p }); ++ if (!_M_dirs->top().advance(ec)) ++ _M_dirs.reset(); ++ } ++ else ++ { ++ const int err = errno; ++ if (err == EACCES ++ && is_set(options, fs::directory_options::skip_permission_denied)) ++ return; ++ ++ if (!ec) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "recursive directory iterator cannot open directory", p, ++ std::error_code(err, std::generic_category()))); ++ ++ ec->assign(err, std::generic_category()); ++ } ++} ++ ++fs::recursive_directory_iterator::~recursive_directory_iterator() = default; ++ ++int ++fs::recursive_directory_iterator::depth() const ++{ ++ return int(_M_dirs->size()) - 1; ++} ++ ++const fs::directory_entry& ++fs::recursive_directory_iterator::operator*() const ++{ ++ return _M_dirs->top().entry; ++} ++ ++fs::recursive_directory_iterator& ++fs::recursive_directory_iterator:: ++operator=(const recursive_directory_iterator& other) noexcept = default; ++ ++fs::recursive_directory_iterator& ++fs::recursive_directory_iterator:: ++operator=(recursive_directory_iterator&& other) noexcept = default; ++ ++fs::recursive_directory_iterator& ++fs::recursive_directory_iterator::operator++() ++{ ++ error_code ec; ++ increment(ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "cannot increment recursive directory iterator", ec)); ++ return *this; ++} ++ ++namespace ++{ ++ bool ++ recurse(const fs::_Dir& d, fs::directory_options options, std::error_code& ec) ++ { ++ bool follow_symlink ++ = is_set(options, fs::directory_options::follow_directory_symlink); ++#ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE ++ if (d.type == fs::file_type::directory) ++ return true; ++ if (d.type == fs::file_type::symlink && follow_symlink) ++ return d.entry.status().type() == fs::file_type::directory; ++ if (d.type != fs::file_type::none && d.type != fs::file_type::unknown) ++ return false; ++#endif ++ const fs::path& path = d.entry.path(); ++ auto type = fs::symlink_status(path, ec).type(); ++ if (ec.value()) ++ return false; ++ if (type == fs::file_type::symlink) ++ { ++ if (!follow_symlink) ++ return false; ++ type = fs::status(path, ec).type(); ++ } ++ return type == fs::file_type::directory; ++ } ++} ++ ++fs::recursive_directory_iterator& ++fs::recursive_directory_iterator::increment(error_code& ec) noexcept ++{ ++ if (!_M_dirs) ++ { ++ ec = std::make_error_code(errc::invalid_argument); ++ return *this; ++ } ++ ++ auto& top = _M_dirs->top(); ++ ++ if (std::exchange(_M_pending, true) && recurse(top, _M_options, ec)) ++ { ++ _Dir dir = opendir(top.entry.path(), _M_options, &ec); ++ if (ec.value()) ++ return *this; ++ if (dir.dirp) ++ { ++ _M_dirs->push(std::move(dir)); ++ if (!_M_dirs->top().advance(&ec)) // dir is empty ++ pop(); ++ return *this; ++ } ++ // else skip permission denied and continue in parent dir ++ } ++ ++ ec.clear(); ++ while (!_M_dirs->top().advance(&ec) && !ec.value()) ++ { ++ _M_dirs->pop(); ++ if (_M_dirs->empty()) ++ { ++ _M_dirs.reset(); ++ return *this; ++ } ++ } ++ return *this; ++} ++ ++void ++fs::recursive_directory_iterator::pop() ++{ ++ if (!_M_dirs) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "cannot pop non-dereferenceable recursive directory iterator", ++ std::make_error_code(errc::invalid_argument))); ++ ++ do { ++ _M_dirs->pop(); ++ if (_M_dirs->empty()) ++ { ++ _M_dirs.reset(); ++ return; ++ } ++ } while (!_M_dirs->top().advance(nullptr)); ++} +Index: libstdc++-v3/src/filesystem/ops.cc +=================================================================== +--- a/src/libstdc++-v3/src/filesystem/ops.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/filesystem/ops.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,1233 @@ ++// Filesystem operations -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++#include <experimental/filesystem> ++#include <functional> ++#include <stack> ++#include <stdlib.h> ++#include <stdio.h> ++#include <errno.h> ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++# include <unistd.h> ++# if defined(_GLIBCXX_HAVE_SYS_STAT_H) && defined(_GLIBCXX_HAVE_SYS_TYPES_H) ++# include <sys/types.h> ++# include <sys/stat.h> ++# endif ++#endif ++#ifdef _GLIBCXX_HAVE_FCNTL_H ++# include <fcntl.h> ++#endif ++#ifdef _GLIBCXX_HAVE_SYS_STATVFS_H ++# include <sys/statvfs.h> ++#endif ++#ifdef _GLIBCXX_USE_SENDFILE ++# include <sys/sendfile.h> ++#else ++# include <ext/stdio_filebuf.h> ++# include <ostream> ++#endif ++#if _GLIBCXX_HAVE_UTIME_H ++# include <utime.h> ++#endif ++ ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# undef utime ++# define utime _wutime ++# undef chmod ++# define chmod _wchmod ++#endif ++ ++namespace fs = std::experimental::filesystem; ++ ++fs::path ++fs::absolute(const path& p, const path& base) ++{ ++ const bool has_root_dir = p.has_root_directory(); ++ const bool has_root_name = p.has_root_name(); ++ path abs; ++ if (has_root_dir && has_root_name) ++ abs = p; ++ else ++ { ++ abs = base.is_absolute() ? base : absolute(base); ++ if (has_root_dir) ++ abs = abs.root_name() / p; ++ else if (has_root_name) ++ abs = p.root_name() / abs.root_directory() / abs.relative_path() ++ / p.relative_path(); ++ else ++ abs = abs / p; ++ } ++ return abs; ++} ++ ++namespace ++{ ++ struct free_as_in_malloc ++ { ++ void operator()(void* p) const { ::free(p); } ++ }; ++ ++ using char_ptr = std::unique_ptr<char[], free_as_in_malloc>; ++} ++ ++fs::path ++fs::canonical(const path& p, const path& base, error_code& ec) ++{ ++ path can; ++#ifdef _GLIBCXX_USE_REALPATH ++ if (char_ptr rp = char_ptr{::realpath(absolute(p, base).c_str(), nullptr)}) ++ { ++ can.assign(rp.get()); ++ ec.clear(); ++ } ++ else ++ ec.assign(errno, std::generic_category()); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++ return can; ++} ++ ++fs::path ++fs::canonical(const path& p, error_code& ec) ++{ ++ path cur = current_path(ec); ++ if (ec.value()) ++ return {}; ++ return canonical(p, cur, ec); ++} ++ ++fs::path ++fs::canonical(const path& p, const path& base) ++{ ++ error_code ec; ++ path can = canonical(p, base, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot canonicalize", p, ec)); ++ return can; ++} ++ ++void ++fs::copy(const path& from, const path& to, copy_options options) ++{ ++ error_code ec; ++ copy(from, to, options, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot copy", from, to, ec)); ++} ++ ++namespace ++{ ++ template<typename Bitmask> ++ inline bool is_set(Bitmask obj, Bitmask bits) ++ { ++ return (obj & bits) != Bitmask::none; ++ } ++} ++ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++namespace ++{ ++ typedef struct ::stat stat_type; ++ ++ inline fs::file_type ++ make_file_type(const stat_type& st) ++ { ++ using fs::file_type; ++#ifdef _GLIBCXX_HAVE_S_ISREG ++ if (S_ISREG(st.st_mode)) ++ return file_type::regular; ++ else if (S_ISDIR(st.st_mode)) ++ return file_type::directory; ++ else if (S_ISCHR(st.st_mode)) ++ return file_type::character; ++ else if (S_ISBLK(st.st_mode)) ++ return file_type::block; ++ else if (S_ISFIFO(st.st_mode)) ++ return file_type::fifo; ++ else if (S_ISLNK(st.st_mode)) ++ return file_type::symlink; ++ else if (S_ISSOCK(st.st_mode)) ++ return file_type::socket; ++#endif ++ return file_type::unknown; ++ ++ } ++ ++ inline fs::file_status ++ make_file_status(const stat_type& st) ++ { ++ return fs::file_status{ ++ make_file_type(st), ++ static_cast<fs::perms>(st.st_mode) & fs::perms::mask ++ }; ++ } ++ ++ inline bool ++ is_not_found_errno(int err) ++ { ++ return err == ENOENT || err == ENOTDIR; ++ } ++ ++ inline fs::file_time_type ++ file_time(const stat_type& st) ++ { ++ using namespace std::chrono; ++ return fs::file_time_type{ ++#ifdef _GLIBCXX_USE_ST_MTIM ++ seconds{st.st_mtim.tv_sec} + nanoseconds{st.st_mtim.tv_nsec} ++#else ++ seconds{st.st_mtime} ++#endif ++ }; ++ } ++ ++ bool ++ do_copy_file(const fs::path& from, const fs::path& to, ++ fs::copy_options option, ++ stat_type* from_st, stat_type* to_st, ++ std::error_code& ec) noexcept ++ { ++ stat_type st1, st2; ++ fs::file_status t, f; ++ ++ if (to_st == nullptr) ++ { ++ if (::stat(to.c_str(), &st1)) ++ { ++ int err = errno; ++ if (!is_not_found_errno(err)) ++ { ++ ec.assign(err, std::generic_category()); ++ return false; ++ } ++ } ++ else ++ to_st = &st1; ++ } ++ else if (to_st == from_st) ++ to_st = nullptr; ++ ++ if (to_st == nullptr) ++ t = fs::file_status{fs::file_type::not_found}; ++ else ++ t = make_file_status(*to_st); ++ ++ if (from_st == nullptr) ++ { ++ if (::stat(from.c_str(), &st2)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ else ++ from_st = &st2; ++ } ++ f = make_file_status(*from_st); ++ ++ using opts = fs::copy_options; ++ ++ if (exists(t)) ++ { ++ if (!is_other(t) && !is_other(f) ++ && to_st->st_dev == from_st->st_dev ++ && to_st->st_ino == from_st->st_ino) ++ { ++ ec = std::make_error_code(std::errc::file_exists); ++ return false; ++ } ++ ++ if (is_set(option, opts::skip_existing)) ++ { ++ ec.clear(); ++ return false; ++ } ++ else if (is_set(option, opts::update_existing)) ++ { ++ if (file_time(*from_st) <= file_time(*to_st)) ++ { ++ ec.clear(); ++ return false; ++ } ++ } ++ else if (!is_set(option, opts::overwrite_existing)) ++ { ++ ec = std::make_error_code(std::errc::file_exists); ++ return false; ++ } ++ } ++ ++ struct CloseFD { ++ ~CloseFD() { if (fd != -1) ::close(fd); } ++ int fd; ++ }; ++ ++ CloseFD in = { ::open(from.c_str(), O_RDONLY) }; ++ if (in.fd == -1) ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ int oflag = O_WRONLY|O_CREAT; ++ if (is_set(option, opts::overwrite_existing|opts::update_existing)) ++ oflag |= O_TRUNC; ++ else ++ oflag |= O_EXCL; ++ CloseFD out = { ::open(to.c_str(), oflag, S_IWUSR) }; ++ if (out.fd == -1) ++ { ++ if (errno == EEXIST && is_set(option, opts::skip_existing)) ++ ec.clear(); ++ else ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ ++#ifdef _GLIBCXX_USE_SENDFILE ++ auto n = ::sendfile(out.fd, in.fd, nullptr, from_st->st_size); ++ if (n != from_st->st_size) ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++#else ++ __gnu_cxx::stdio_filebuf<char> sbin(in.fd, std::ios::in); ++ __gnu_cxx::stdio_filebuf<char> sbout(out.fd, std::ios::out); ++ if ( !(std::ostream(&sbout) << &sbin) ) ++ { ++ ec = std::make_error_code(std::errc::io_error); ++ return false; ++ } ++#endif ++ ++#ifdef _GLIBCXX_USE_FCHMOD ++ if (::fchmod(out.fd, from_st->st_mode)) ++#elif _GLIBCXX_USE_FCHMODAT ++ if (::fchmodat(AT_FDCWD, to.c_str(), from_st->st_mode, 0)) ++#else ++ if (::chmod(to.c_str(), from_st->st_mode)) ++#endif ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ ec.clear(); ++ return true; ++ } ++} ++#endif ++ ++void ++fs::copy(const path& from, const path& to, copy_options options, ++ error_code& ec) noexcept ++{ ++ bool skip_symlinks = is_set(options, copy_options::skip_symlinks); ++ bool create_symlinks = is_set(options, copy_options::create_symlinks); ++ bool use_lstat = create_symlinks || skip_symlinks; ++ ++ file_status f, t; ++ stat_type from_st, to_st; ++ if (use_lstat ++ ? ::lstat(from.c_str(), &from_st) ++ : ::stat(from.c_str(), &from_st)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return; ++ } ++ if (use_lstat ++ ? ::lstat(to.c_str(), &to_st) ++ : ::stat(to.c_str(), &to_st)) ++ { ++ if (!is_not_found_errno(errno)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return; ++ } ++ t = file_status{file_type::not_found}; ++ } ++ else ++ t = make_file_status(to_st); ++ f = make_file_status(from_st); ++ ++ if (exists(t) && !is_other(t) && !is_other(f) ++ && to_st.st_dev == from_st.st_dev && to_st.st_ino == from_st.st_ino) ++ { ++ ec = std::make_error_code(std::errc::file_exists); ++ return; ++ } ++ if (is_other(f) || is_other(t)) ++ { ++ ec = std::make_error_code(std::errc::not_supported); ++ return; ++ } ++ if (is_directory(f) && is_regular_file(t)) ++ { ++ ec = std::make_error_code(std::errc::is_a_directory); ++ return; ++ } ++ ++ if (is_symlink(f)) ++ { ++ if (skip_symlinks) ++ ec.clear(); ++ else if (!exists(t) && is_set(options, copy_options::copy_symlinks)) ++ copy_symlink(from, to, ec); ++ else ++ // Not clear what should be done here. ++ // "Otherwise report an error as specified in Error reporting (7)." ++ ec = std::make_error_code(std::errc::invalid_argument); ++ } ++ else if (is_regular_file(f)) ++ { ++ if (is_set(options, copy_options::directories_only)) ++ ec.clear(); ++ else if (create_symlinks) ++ create_symlink(from, to, ec); ++ else if (is_set(options, copy_options::create_hard_links)) ++ create_hard_link(from, to, ec); ++ else if (is_directory(t)) ++ do_copy_file(from, to / from.filename(), options, &from_st, 0, ec); ++ else ++ { ++ auto ptr = exists(t) ? &to_st : &from_st; ++ do_copy_file(from, to, options, &from_st, ptr, ec); ++ } ++ } ++ else if (is_directory(f) && (is_set(options, copy_options::recursive) ++ || options == copy_options::none)) ++ { ++ if (!exists(t)) ++ if (!create_directory(to, from, ec)) ++ return; ++ // set an unused bit in options to disable further recursion ++ if (!is_set(options, copy_options::recursive)) ++ options |= static_cast<copy_options>(4096); ++ for (const directory_entry& x : directory_iterator(from)) ++ copy(x.path(), to/x.path().filename(), options, ec); ++ } ++ // "Otherwise no effects." (should ec.clear() be called?) ++} ++ ++bool ++fs::copy_file(const path& from, const path& to, copy_options option) ++{ ++ error_code ec; ++ bool result = copy_file(from, to, option, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot copy file", from, to, ++ ec)); ++ return result; ++} ++ ++bool ++fs::copy_file(const path& from, const path& to, copy_options option, ++ error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ return do_copy_file(from, to, option, nullptr, nullptr, ec); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++ return false; ++#endif ++} ++ ++ ++void ++fs::copy_symlink(const path& existing_symlink, const path& new_symlink) ++{ ++ error_code ec; ++ copy_symlink(existing_symlink, new_symlink, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot copy symlink", ++ existing_symlink, new_symlink, ec)); ++} ++ ++void ++fs::copy_symlink(const path& existing_symlink, const path& new_symlink, ++ error_code& ec) noexcept ++{ ++ auto p = read_symlink(existing_symlink, ec); ++ if (ec.value()) ++ return; ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ if (is_directory(p)) ++ { ++ create_directory_symlink(p, new_symlink, ec); ++ return; ++ } ++#endif ++ create_symlink(p, new_symlink, ec); ++} ++ ++ ++bool ++fs::create_directories(const path& p) ++{ ++ error_code ec; ++ bool result = create_directories(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create directories", p, ++ ec)); ++ return result; ++} ++ ++bool ++fs::create_directories(const path& p, error_code& ec) noexcept ++{ ++ std::stack<path> missing; ++ path pp = p; ++ ec.clear(); ++ while (!p.empty() && !exists(pp, ec) && !ec.value()) ++ { ++ missing.push(pp); ++ pp = pp.parent_path(); ++ } ++ while (!missing.empty() && !ec.value()) ++ { ++ create_directory(missing.top(), ec); ++ missing.pop(); ++ } ++ return missing.empty(); ++} ++ ++namespace ++{ ++ bool ++ create_dir(const fs::path& p, fs::perms perm, std::error_code& ec) ++ { ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ ::mode_t mode = static_cast<std::underlying_type_t<fs::perms>>(perm); ++ if (::mkdir(p.c_str(), mode)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ else ++ { ++ ec.clear(); ++ return true; ++ } ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++ return false; ++#endif ++ } ++} // namespace ++ ++bool ++fs::create_directory(const path& p) ++{ ++ error_code ec; ++ bool result = create_directory(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create directory", p, ++ ec)); ++ return result; ++} ++ ++bool ++fs::create_directory(const path& p, error_code& ec) noexcept ++{ ++ return create_dir(p, perms::all, ec); ++} ++ ++ ++bool ++fs::create_directory(const path& p, const path& attributes) ++{ ++ error_code ec; ++ bool result = create_directory(p, attributes, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create directory", p, ++ ec)); ++ return result; ++} ++ ++bool ++fs::create_directory(const path& p, const path& attributes, ++ error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ stat_type st; ++ if (::stat(attributes.c_str(), &st)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return false; ++ } ++ return create_dir(p, static_cast<perms>(st.st_mode), ec); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++ return false; ++#endif ++} ++ ++ ++void ++fs::create_directory_symlink(const path& to, const path& new_symlink) ++{ ++ error_code ec; ++ create_directory_symlink(to, new_symlink, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create directory symlink", ++ to, new_symlink, ec)); ++} ++ ++void ++fs::create_directory_symlink(const path& to, const path& new_symlink, ++ error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ ec = std::make_error_code(std::errc::not_supported); ++#else ++ create_symlink(to, new_symlink, ec); ++#endif ++} ++ ++ ++void ++fs::create_hard_link(const path& to, const path& new_hard_link) ++{ ++ error_code ec; ++ create_hard_link(to, new_hard_link, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create hard link", ++ to, new_hard_link, ec)); ++} ++ ++void ++fs::create_hard_link(const path& to, const path& new_hard_link, ++ error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++ if (::link(to.c_str(), new_hard_link.c_str())) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++} ++ ++void ++fs::create_symlink(const path& to, const path& new_symlink) ++{ ++ error_code ec; ++ create_symlink(to, new_symlink, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot create symlink", ++ to, new_symlink, ec)); ++} ++ ++void ++fs::create_symlink(const path& to, const path& new_symlink, ++ error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++ if (::symlink(to.c_str(), new_symlink.c_str())) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++} ++ ++ ++fs::path ++fs::current_path() ++{ ++ error_code ec; ++ path p = current_path(ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot get current path", ec)); ++ return p; ++} ++ ++fs::path ++fs::current_path(error_code& ec) ++{ ++ path p; ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++#ifdef __GLIBC__ ++ if (char_ptr cwd = char_ptr{::getcwd(nullptr, 0)}) ++ { ++ p.assign(cwd.get()); ++ ec.clear(); ++ } ++ else ++ ec.assign(errno, std::generic_category()); ++#else ++ long path_max = pathconf(".", _PC_PATH_MAX); ++ size_t size; ++ if (path_max == -1) ++ size = 1024; ++ else if (path_max > 10240) ++ size = 10240; ++ else ++ size = path_max; ++ for (char_ptr buf; p.empty(); size *= 2) ++ { ++ buf.reset((char*)malloc(size)); ++ if (buf) ++ { ++ if (getcwd(buf.get(), size)) ++ { ++ p.assign(buf.get()); ++ ec.clear(); ++ } ++ else if (errno != ERANGE) ++ { ++ ec.assign(errno, std::generic_category()); ++ return {}; ++ } ++ } ++ else ++ { ++ ec = std::make_error_code(std::errc::not_enough_memory); ++ return {}; ++ } ++ } ++#endif // __GLIBC__ ++#else // _GLIBCXX_HAVE_UNISTD_H ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++ return p; ++} ++ ++void ++fs::current_path(const path& p) ++{ ++ error_code ec; ++ current_path(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot set current path", ec)); ++} ++ ++void ++fs::current_path(const path& p, error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++ if (::chdir(p.c_str())) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++} ++ ++bool ++fs::equivalent(const path& p1, const path& p2) ++{ ++ error_code ec; ++ auto result = equivalent(p1, p2, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot check file equivalence", ++ p1, p2, ec)); ++ return result; ++} ++ ++bool ++fs::equivalent(const path& p1, const path& p2, error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ stat_type st1, st2; ++ if (::stat(p1.c_str(), &st1) == 0 && ::stat(p2.c_str(), &st2) == 0) ++ { ++ file_status s1 = make_file_status(st1); ++ file_status s2 = make_file_status(st2); ++ if (is_other(s1) && is_other(s2)) ++ { ++ ec = std::make_error_code(std::errc::not_supported); ++ return false; ++ } ++ ec.clear(); ++ return st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino; ++ } ++ else if (is_not_found_errno(errno)) ++ { ++ ec = std::make_error_code(std::errc::no_such_file_or_directory); ++ return false; ++ } ++ ec.assign(errno, std::generic_category()); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++ return false; ++} ++ ++std::uintmax_t ++fs::file_size(const path& p) ++{ ++ error_code ec; ++ auto sz = file_size(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot get file size", p, ec)); ++ return sz; ++} ++ ++namespace ++{ ++ template<typename Accessor, typename T> ++ inline T ++ do_stat(const fs::path& p, std::error_code& ec, Accessor f, T deflt) ++ { ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ stat_type st; ++ if (::stat(p.c_str(), &st)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return deflt; ++ } ++ ec.clear(); ++ return f(st); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++ return deflt; ++#endif ++ } ++} ++ ++std::uintmax_t ++fs::file_size(const path& p, error_code& ec) noexcept ++{ ++ struct S ++ { ++ S(const stat_type& st) : type(make_file_type(st)), size(st.st_size) { } ++ S() : type(file_type::not_found) { } ++ file_type type; ++ size_t size; ++ }; ++ auto s = do_stat(p, ec, [](const auto& st) { return S{st}; }, S{}); ++ if (s.type == file_type::regular) ++ return s.size; ++ if (!ec) ++ { ++ if (s.type == file_type::directory) ++ ec = std::make_error_code(std::errc::is_a_directory); ++ else ++ ec = std::make_error_code(std::errc::not_supported); ++ } ++ return -1; ++} ++ ++std::uintmax_t ++fs::hard_link_count(const path& p) ++{ ++ error_code ec; ++ auto count = hard_link_count(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot get link count", p, ec)); ++ return count; ++} ++ ++std::uintmax_t ++fs::hard_link_count(const path& p, error_code& ec) noexcept ++{ ++ return do_stat(p, ec, std::mem_fn(&stat::st_nlink), ++ static_cast<uintmax_t>(-1)); ++} ++ ++bool ++fs::is_empty(const path& p) ++{ ++ return fs::is_directory(status(p)) ++ ? fs::directory_iterator(p) == fs::directory_iterator() ++ : fs::file_size(p) == 0; ++} ++ ++bool ++fs::is_empty(const path& p, error_code& ec) noexcept ++{ ++ auto s = status(p, ec); ++ if (ec.value()) ++ return false; ++ return fs::is_directory(s) ++ ? fs::directory_iterator(p, ec) == fs::directory_iterator() ++ : fs::file_size(p, ec) == 0; ++} ++ ++fs::file_time_type ++fs::last_write_time(const path& p) ++{ ++ error_code ec; ++ auto t = last_write_time(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot get file time", p, ec)); ++ return t; ++} ++ ++fs::file_time_type ++fs::last_write_time(const path& p, error_code& ec) noexcept ++{ ++ return do_stat(p, ec, [](const auto& st) { return file_time(st); }, ++ file_time_type::min()); ++} ++ ++void ++fs::last_write_time(const path& p, file_time_type new_time) ++{ ++ error_code ec; ++ last_write_time(p, new_time, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot set file time", p, ec)); ++} ++ ++void ++fs::last_write_time(const path& p __attribute__((__unused__)), ++ file_time_type new_time, error_code& ec) noexcept ++{ ++ auto d = new_time.time_since_epoch(); ++ auto s = chrono::duration_cast<chrono::seconds>(d); ++#if _GLIBCXX_USE_UTIMENSAT ++ auto ns = chrono::duration_cast<chrono::nanoseconds>(d - s); ++ struct ::timespec ts[2]; ++ ts[0].tv_sec = 0; ++ ts[0].tv_nsec = UTIME_OMIT; ++ ts[1].tv_sec = static_cast<std::time_t>(s.count()); ++ ts[1].tv_nsec = static_cast<long>(ns.count()); ++ if (::utimensat(AT_FDCWD, p.c_str(), ts, 0)) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#elif _GLIBCXX_HAVE_UTIME_H ++ ::utimbuf times; ++ times.modtime = s.count(); ++ times.actime = do_stat(p, ec, [](const auto& st) { return st.st_atime; }, ++ times.modtime); ++ if (::utime(p.c_str(), ×)) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++} ++ ++void ++fs::permissions(const path& p, perms prms) ++{ ++ error_code ec; ++ permissions(p, prms, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot set permissions", p, ec)); ++} ++ ++void fs::permissions(const path& p, perms prms, error_code& ec) noexcept ++{ ++#if _GLIBCXX_USE_FCHMODAT ++ if (::fchmodat(AT_FDCWD, p.c_str(), static_cast<mode_t>(prms), 0)) ++#else ++ if (::chmod(p.c_str(), static_cast<mode_t>(prms))) ++#endif ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++} ++ ++fs::path ++fs::read_symlink(const path& p) ++{ ++ error_code ec; ++ path tgt = read_symlink(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("read_symlink", p, ec)); ++ return tgt; ++} ++ ++fs::path fs::read_symlink(const path& p, error_code& ec) ++{ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++ stat_type st; ++ if (::lstat(p.c_str(), &st)) ++ { ++ ec.assign(errno, std::generic_category()); ++ return {}; ++ } ++ std::string buf(st.st_size, '\0'); ++ ssize_t len = ::readlink(p.c_str(), &buf.front(), buf.size()); ++ if (len == -1) ++ { ++ ec.assign(errno, std::generic_category()); ++ return {}; ++ } ++ return path{buf.data(), buf.data()+len}; ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++ return {}; ++#endif ++} ++ ++ ++bool ++fs::remove(const path& p) ++{ ++ error_code ec; ++ bool result = fs::remove(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot remove", p, ec)); ++ return result; ++} ++ ++bool ++fs::remove(const path& p, error_code& ec) noexcept ++{ ++ if (exists(symlink_status(p, ec))) ++ { ++ if (::remove(p.c_str()) == 0) ++ { ++ ec.clear(); ++ return true; ++ } ++ else ++ ec.assign(errno, std::generic_category()); ++ } ++ return false; ++} ++ ++ ++std::uintmax_t ++fs::remove_all(const path& p) ++{ ++ error_code ec; ++ bool result = remove_all(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot remove all", p, ec)); ++ return result; ++} ++ ++std::uintmax_t ++fs::remove_all(const path& p, error_code& ec) noexcept ++{ ++ auto fs = symlink_status(p, ec); ++ 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(d->path(), ec); ++ if (ec.value()) ++ return -1; ++ return fs::remove(p, ec) ? ++count : -1; // fs:remove() calls ec.clear() ++} ++ ++void ++fs::rename(const path& from, const path& to) ++{ ++ error_code ec; ++ rename(from, to, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot rename", from, to, ec)); ++} ++ ++void ++fs::rename(const path& from, const path& to, error_code& ec) noexcept ++{ ++ if (::rename(from.c_str(), to.c_str())) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++} ++ ++void ++fs::resize_file(const path& p, uintmax_t size) ++{ ++ error_code ec; ++ resize_file(p, size, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot resize file", p, ec)); ++} ++ ++void ++fs::resize_file(const path& p, uintmax_t size, error_code& ec) noexcept ++{ ++#ifdef _GLIBCXX_HAVE_UNISTD_H ++ if (size > static_cast<uintmax_t>(std::numeric_limits<off_t>::max())) ++ ec.assign(EINVAL, std::generic_category()); ++ else if (::truncate(p.c_str(), size)) ++ ec.assign(errno, std::generic_category()); ++ else ++ ec.clear(); ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++} ++ ++ ++fs::space_info ++fs::space(const path& p) ++{ ++ error_code ec; ++ space_info s = space(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot get free space", p, ec)); ++ return s; ++} ++ ++fs::space_info ++fs::space(const path& p, error_code& ec) noexcept ++{ ++ space_info info = { ++ static_cast<uintmax_t>(-1), ++ static_cast<uintmax_t>(-1), ++ static_cast<uintmax_t>(-1) ++ }; ++#ifdef _GLIBCXX_HAVE_SYS_STATVFS_H ++ struct ::statvfs f; ++ if (::statvfs(p.c_str(), &f)) ++ ec.assign(errno, std::generic_category()); ++ else ++ { ++ info = space_info{ ++ f.f_blocks * f.f_frsize, ++ f.f_bfree * f.f_frsize, ++ f.f_bavail * f.f_frsize ++ }; ++ ec.clear(); ++ } ++#else ++ ec = std::make_error_code(std::errc::not_supported); ++#endif ++ return info; ++} ++ ++#ifdef _GLIBCXX_HAVE_SYS_STAT_H ++fs::file_status ++fs::status(const fs::path& p, std::error_code& ec) noexcept ++{ ++ file_status status; ++ stat_type st; ++ if (::stat(p.c_str(), &st)) ++ { ++ int err = errno; ++ ec.assign(err, std::generic_category()); ++ if (is_not_found_errno(err)) ++ status.type(file_type::not_found); ++ } ++ else ++ { ++ status = make_file_status(st); ++ ec.clear(); ++ } ++ return status; ++} ++ ++fs::file_status ++fs::symlink_status(const fs::path& p, std::error_code& ec) noexcept ++{ ++ file_status status; ++ stat_type st; ++ if (::lstat(p.c_str(), &st)) ++ { ++ int err = errno; ++ ec.assign(err, std::generic_category()); ++ if (is_not_found_errno(err)) ++ status.type(file_type::not_found); ++ } ++ else ++ { ++ status = make_file_status(st); ++ ec.clear(); ++ } ++ return status; ++} ++#endif ++ ++fs::file_status ++fs::status(const fs::path& p) ++{ ++ std::error_code ec; ++ auto result = status(p, ec); ++ if (result.type() == file_type::none) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("status", p, ec)); ++ return result; ++} ++ ++fs::file_status ++fs::symlink_status(const fs::path& p) ++{ ++ std::error_code ec; ++ auto result = symlink_status(p, ec); ++ if (result.type() == file_type::none) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("symlink_status", p, ec)); ++ return result; ++} ++ ++fs::path ++fs::system_complete(const path& p) ++{ ++ error_code ec; ++ path comp = system_complete(p, ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("system_complete", p, ec)); ++ return comp; ++} ++ ++fs::path ++fs::system_complete(const path& p, error_code& ec) ++{ ++ path base = current_path(ec); ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ if (p.is_absolute() || !p.has_root_name() ++ || p.root_name() == base.root_name()) ++ return absolute(p, base); ++ // else TODO ++ ec = std::make_error_code(std::errc::not_supported); ++ return {}; ++#else ++ if (ec.value()) ++ return {}; ++ return absolute(p, base); ++#endif ++} ++ ++fs::path fs::temp_directory_path() ++{ ++ error_code ec; ++ path tmp = temp_directory_path(ec); ++ if (ec.value()) ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error("temp_directory_path", ec)); ++ return tmp; ++} ++ ++fs::path fs::temp_directory_path(error_code& ec) ++{ ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ ec = std::make_error_code(std::errc::not_supported); ++ return {}; // TODO ++#else ++ const char* tmpdir = nullptr; ++ const char* env[] = { "TMPDIR", "TMP", "TEMP", "TEMPDIR", nullptr }; ++ for (auto e = env; tmpdir == nullptr && *e != nullptr; ++e) ++ tmpdir = ::getenv(*e); ++ path p = tmpdir ? tmpdir : "/tmp"; ++ if (exists(p) && is_directory(p)) ++ { ++ ec.clear(); ++ return p; ++ } ++ ec = std::make_error_code(std::errc::not_a_directory); ++ return {}; ++#endif ++} ++ +Index: libstdc++-v3/src/filesystem/Makefile.am +=================================================================== +--- a/src/libstdc++-v3/src/filesystem/Makefile.am (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/filesystem/Makefile.am (.../branches/gcc-5-branch) +@@ -0,0 +1,100 @@ ++## Makefile for the GNU C++ Filesystem library. ++## ++## Copyright (C) 2014-2015 Free Software Foundation, Inc. ++## ++## Process this file with automake to produce Makefile.in. ++## ++## This file is part of GCC. ++## ++## GCC 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. ++## ++## GCC 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 GCC; see the file COPYING3. If not see ++## <http://www.gnu.org/licenses/>. ++ ++include $(top_srcdir)/fragment.am ++ ++toolexeclib_LTLIBRARIES = libstdc++fs.la ++ ++headers = ++ ++sources = \ ++ dir.cc \ ++ ops.cc \ ++ path.cc ++ ++# vpath % $(top_srcdir)/src/filesystem ++ ++libstdc__fs_la_SOURCES = $(sources) ++ ++# AM_CXXFLAGS needs to be in each subdirectory so that it can be ++# modified in a per-library or per-sub-library way. Need to manually ++# set this option because CONFIG_CXXFLAGS has to be after ++# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden ++# as the occasion call for it. ++AM_CXXFLAGS = \ ++ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ ++ -std=gnu++14 \ ++ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) ++ ++AM_MAKEFLAGS = \ ++ "gxx_include_dir=$(gxx_include_dir)" ++ ++ ++# Libtool notes ++ ++# 1) In general, libtool expects an argument such as `--tag=CXX' when ++# using the C++ compiler, because that will enable the settings ++# detected when C++ support was being configured. However, when no ++# such flag is given in the command line, libtool attempts to figure ++# it out by matching the compiler name in each configuration section ++# against a prefix of the command line. The problem is that, if the ++# compiler name and its initial flags stored in the libtool ++# configuration file don't match those in the command line, libtool ++# can't decide which configuration to use, and it gives up. The ++# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe ++# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to ++# attempt to infer which configuration to use. ++# ++# The second tag argument, `--tag disable-shared` means that libtool ++# only compiles each source once, for static objects. In actuality, ++# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to ++# the libtool command that is used create the object, which is ++# suitable for shared libraries. The `--tag disable-shared` must be ++# placed after --tag CXX lest things CXX undo the affect of ++# disable-shared. ++ ++# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is ++# last. (That way, things like -O2 passed down from the toplevel can ++# be overridden by --enable-debug.) ++LTCXXCOMPILE = \ ++ $(LIBTOOL) --tag CXX --tag disable-shared \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS) ++ ++LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) ++ ++# 3) We'd have a problem when building the shared libstdc++ object if ++# the rules automake generates would be used. We cannot allow g++ to ++# be used since this would add -lstdc++ to the link line which of ++# course is problematic at this point. So, we get the top-level ++# directory to configure libstdc++-v3 to use gcc as the C++ ++# compilation driver. ++CXXLINK = \ ++ $(LIBTOOL) --tag CXX --tag disable-shared \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CXX) \ ++ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ ++ ++# By adding these files here, automake will remove them for 'make clean' ++CLEANFILES = stamp-* ++ +Index: libstdc++-v3/src/Makefile.am +=================================================================== +--- a/src/libstdc++-v3/src/Makefile.am (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/Makefile.am (.../branches/gcc-5-branch) +@@ -22,8 +22,14 @@ + + include $(top_srcdir)/fragment.am + +-SUBDIRS = c++98 c++11 ++if ENABLE_FILESYSTEM_TS ++filesystem_dir = filesystem ++else ++filesystem_dir = ++endif + ++SUBDIRS = c++98 c++11 $(filesystem_dir) ++ + # Cross compiler support. + if VTV_CYGMIN + toolexeclib_LTLIBRARIES = libvtv.la libstdc++.la +@@ -52,6 +58,9 @@ + + vpath % $(top_srcdir)/src/c++98 + vpath % $(top_srcdir)/src/c++11 ++if ENABLE_FILESYSTEM_TS ++vpath % $(top_srcdir)/src/filesystem ++endif + + if GLIBCXX_LDBL_COMPAT + ldbl_compat_sources = compatibility-ldbl.cc +Index: libstdc++-v3/src/c++98/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/src/c++98/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/c++98/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -16,6 +16,23 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -99,6 +116,11 @@ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + CXXLD = $(CXX) + SOURCES = $(libc__98convenience_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ETAGS = etags + CTAGS = ctags + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ +@@ -501,6 +523,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -519,7 +542,7 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) ++libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) $(EXTRA_libc__98convenience_la_DEPENDENCIES) + $(CXXLINK) $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_LIBADD) $(LIBS) + + mostlyclean-compile: +@@ -608,10 +631,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/src/c++11/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/src/c++11/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/src/c++11/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -16,6 +16,23 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -98,6 +115,11 @@ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + CXXLD = $(CXX) + SOURCES = $(libc__11convenience_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ETAGS = etags + CTAGS = ctags + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ +@@ -485,6 +507,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -503,7 +526,7 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libc++11convenience.la: $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_DEPENDENCIES) ++libc++11convenience.la: $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_DEPENDENCIES) $(EXTRA_libc__11convenience_la_DEPENDENCIES) + $(CXXLINK) $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_LIBADD) $(LIBS) + + mostlyclean-compile: +@@ -592,10 +615,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/configure.ac +=================================================================== +--- a/src/libstdc++-v3/configure.ac (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/configure.ac (.../branches/gcc-5-branch) +@@ -402,6 +402,11 @@ + # For gthread support. Depends on GLIBCXX_ENABLE_SYMVERS. + GLIBCXX_CHECK_GTHREADS + ++# For Filesystem TS. ++AC_CHECK_HEADERS([fcntl.h dirent.h sys/statvfs.h utime.h]) ++GLIBCXX_ENABLE_FILESYSTEM_TS ++GLIBCXX_CHECK_FILESYSTEM_DEPS ++ + # Define documentation rules conditionally. + + # See if makeinfo has been installed and is modern enough +Index: libstdc++-v3/doc/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/doc/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/doc/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,6 +15,23 @@ + + @SET_MAKE@ + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -67,6 +84,11 @@ + depcomp = + am__depfiles_maybe = + SOURCES = ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ + ACLOCAL = @ACLOCAL@ + ALLOCATOR_H = @ALLOCATOR_H@ +@@ -604,6 +626,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -639,10 +662,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/po/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/po/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/po/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,6 +15,23 @@ + + @SET_MAKE@ + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -67,6 +84,11 @@ + depcomp = + am__depfiles_maybe = + SOURCES = ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ + ACLOCAL = @ACLOCAL@ + ALLOCATOR_H = @ALLOCATOR_H@ +@@ -330,6 +352,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -365,10 +388,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/include/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/include/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,6 +15,23 @@ + + @SET_MAKE@ + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -67,6 +84,11 @@ + depcomp = + am__depfiles_maybe = + SOURCES = ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ + ACLOCAL = @ACLOCAL@ + ALLOCATOR_H = @ALLOCATOR_H@ +@@ -396,6 +418,7 @@ + ${bits_srcdir}/postypes.h \ + ${bits_srcdir}/predefined_ops.h \ + ${bits_srcdir}/ptr_traits.h \ ++ ${bits_srcdir}/quoted_string.h \ + ${bits_srcdir}/random.h \ + ${bits_srcdir}/random.tcc \ + ${bits_srcdir}/range_access.h \ +@@ -917,12 +940,21 @@ + ${experimental_srcdir}/optional \ + ${experimental_srcdir}/ratio \ + ${experimental_srcdir}/string_view \ ++ ${experimental_srcdir}/string_view.tcc \ + ${experimental_srcdir}/system_error \ +- ${experimental_srcdir}/string_view.tcc \ + ${experimental_srcdir}/tuple \ +- ${experimental_srcdir}/type_traits ++ ${experimental_srcdir}/type_traits \ ++ ${experimental_filesystem_headers} + ++@ENABLE_FILESYSTEM_TS_FALSE@experimental_filesystem_headers = ++@ENABLE_FILESYSTEM_TS_TRUE@experimental_filesystem_headers = \ ++@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/filesystem \ ++@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_dir.h \ ++@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_fwd.h \ ++@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_ops.h \ ++@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_path.h + ++ + # This is the common subset of C++ files that all three "C" header models use. + c_base_srcdir = $(C_INCLUDE_DIR) + c_base_builddir = . +@@ -1232,6 +1264,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -1267,10 +1300,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +Index: libstdc++-v3/include/std/iomanip +=================================================================== +--- a/src/libstdc++-v3/include/std/iomanip (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/std/iomanip (.../branches/gcc-5-branch) +@@ -42,7 +42,7 @@ + #if __cplusplus >= 201103L + #include <locale> + #if __cplusplus > 201103L +-#include <sstream> // used in quoted. ++#include <bits/quoted_string.h> + #endif + #endif + +@@ -450,127 +450,6 @@ + + #define __cpp_lib_quoted_string_io 201304 + +-_GLIBCXX_END_NAMESPACE_VERSION +- namespace __detail { +- _GLIBCXX_BEGIN_NAMESPACE_VERSION +- +- /** +- * @brief Struct for delimited strings. +- */ +- template<typename _String, typename _CharT> +- struct _Quoted_string +- { +- static_assert(is_reference<_String>::value +- || is_pointer<_String>::value, +- "String type must be pointer or reference"); +- +- _Quoted_string(_String __str, _CharT __del, _CharT __esc) +- : _M_string(__str), _M_delim{__del}, _M_escape{__esc} +- { } +- +- _Quoted_string& +- operator=(_Quoted_string&) = delete; +- +- _String _M_string; +- _CharT _M_delim; +- _CharT _M_escape; +- }; +- +- /** +- * @brief Inserter for quoted strings. +- * +- * _GLIBCXX_RESOLVE_LIB_DEFECTS +- * DR 2344 quoted()'s interaction with padding is unclear +- */ +- template<typename _CharT, typename _Traits> +- auto& +- operator<<(std::basic_ostream<_CharT, _Traits>& __os, +- const _Quoted_string<const _CharT*, _CharT>& __str) +- { +- std::basic_ostringstream<_CharT, _Traits> __ostr; +- __ostr << __str._M_delim; +- for (const _CharT* __c = __str._M_string; *__c; ++__c) +- { +- if (*__c == __str._M_delim || *__c == __str._M_escape) +- __ostr << __str._M_escape; +- __ostr << *__c; +- } +- __ostr << __str._M_delim; +- +- return __os << __ostr.str(); +- } +- +- /** +- * @brief Inserter for quoted strings. +- * +- * _GLIBCXX_RESOLVE_LIB_DEFECTS +- * DR 2344 quoted()'s interaction with padding is unclear +- */ +- template<typename _CharT, typename _Traits, typename _String> +- auto& +- operator<<(std::basic_ostream<_CharT, _Traits>& __os, +- const _Quoted_string<_String, _CharT>& __str) +- { +- std::basic_ostringstream<_CharT, _Traits> __ostr; +- __ostr << __str._M_delim; +- for (auto& __c : __str._M_string) +- { +- if (__c == __str._M_delim || __c == __str._M_escape) +- __ostr << __str._M_escape; +- __ostr << __c; +- } +- __ostr << __str._M_delim; +- +- return __os << __ostr.str(); +- } +- +- /** +- * @brief Extractor for delimited strings. +- * The left and right delimiters can be different. +- */ +- template<typename _CharT, typename _Traits, typename _Alloc> +- auto& +- operator>>(std::basic_istream<_CharT, _Traits>& __is, +- const _Quoted_string<basic_string<_CharT, _Traits, _Alloc>&, +- _CharT>& __str) +- { +- _CharT __c; +- __is >> __c; +- if (!__is.good()) +- return __is; +- if (__c != __str._M_delim) +- { +- __is.unget(); +- __is >> __str._M_string; +- return __is; +- } +- __str._M_string.clear(); +- std::ios_base::fmtflags __flags +- = __is.flags(__is.flags() & ~std::ios_base::skipws); +- do +- { +- __is >> __c; +- if (!__is.good()) +- break; +- if (__c == __str._M_escape) +- { +- __is >> __c; +- if (!__is.good()) +- break; +- } +- else if (__c == __str._M_delim) +- break; +- __str._M_string += __c; +- } +- while (true); +- __is.setf(__flags); +- +- return __is; +- } +- _GLIBCXX_END_NAMESPACE_VERSION +- } // namespace __detail +-_GLIBCXX_BEGIN_NAMESPACE_VERSION +- + /** + * @brief Manipulator for quoted strings. + * @param __string String to quote. +Index: libstdc++-v3/include/experimental/fs_ops.h +=================================================================== +--- a/src/libstdc++-v3/include/experimental/fs_ops.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/experimental/fs_ops.h (.../branches/gcc-5-branch) +@@ -0,0 +1,291 @@ ++// Filesystem operational functions -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file experimental/filesystem ++ * This is a TS C++ Library header. ++ */ ++ ++#ifndef _GLIBCXX_EXPERIMENTAL_FS_OPS_H ++#define _GLIBCXX_EXPERIMENTAL_FS_OPS_H 1 ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++ ++#include <cstdint> ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++namespace experimental ++{ ++namespace filesystem ++{ ++inline namespace v1 ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++ /** ++ * @ingroup filesystem ++ * @{ ++ */ ++ ++ path absolute(const path& __p, const path& __base = current_path()); ++ ++ path canonical(const path& __p, const path& __base = current_path()); ++ path canonical(const path& __p, error_code& __ec); ++ path canonical(const path& __p, const path& __base, error_code& __ec); ++ ++ inline void ++ copy(const path& __from, const path& __to) ++ { copy(__from, __to, copy_options::none); } ++ ++ inline void ++ copy(const path& __from, const path& __to, error_code& __ec) noexcept ++ { copy(__from, __to, copy_options::none, __ec); } ++ ++ void copy(const path& __from, const path& __to, copy_options __options); ++ void copy(const path& __from, const path& __to, copy_options __options, ++ error_code& __ec) noexcept; ++ ++ inline bool ++ copy_file(const path& __from, const path& __to) ++ { return copy_file(__from, __to, copy_options::none); } ++ ++ inline bool ++ copy_file(const path& __from, const path& __to, error_code& __ec) noexcept ++ { return copy_file(__from, __to, copy_options::none, __ec); } ++ ++ bool copy_file(const path& __from, const path& __to, copy_options __option); ++ bool copy_file(const path& __from, const path& __to, copy_options __option, ++ error_code& __ec) noexcept; ++ ++ void copy_symlink(const path& __existing_symlink, const path& __new_symlink); ++ void copy_symlink(const path& __existing_symlink, const path& __new_symlink, ++ error_code& __ec) noexcept; ++ ++ bool create_directories(const path& __p); ++ bool create_directories(const path& __p, error_code& __ec) noexcept; ++ ++ bool create_directory(const path& __p); ++ bool create_directory(const path& __p, error_code& __ec) noexcept; ++ ++ bool create_directory(const path& __p, const path& attributes); ++ bool create_directory(const path& __p, const path& attributes, ++ error_code& __ec) noexcept; ++ ++ void create_directory_symlink(const path& __to, const path& __new_symlink); ++ void create_directory_symlink(const path& __to, const path& __new_symlink, ++ error_code& __ec) noexcept; ++ ++ void create_hard_link(const path& __to, const path& __new_hard_link); ++ void create_hard_link(const path& __to, const path& __new_hard_link, ++ error_code& __ec) noexcept; ++ ++ void create_symlink(const path& __to, const path& __new_symlink); ++ void create_symlink(const path& __to, const path& __new_symlink, ++ error_code& __ec) noexcept; ++ ++ path current_path(); ++ path current_path(error_code& __ec); ++ void current_path(const path& __p); ++ void current_path(const path& __p, error_code& __ec) noexcept; ++ ++ inline bool ++ exists(file_status __s) noexcept ++ { return status_known(__s) && __s.type() != file_type::not_found; } ++ ++ inline bool ++ exists(const path& __p) ++ { return exists(status(__p)); } ++ ++ inline bool ++ exists(const path& __p, error_code& __ec) noexcept ++ { return exists(status(__p, __ec)); } ++ ++ bool ++ equivalent(const path& __p1, const path& __p2); ++ ++ bool ++ equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept; ++ ++ uintmax_t file_size(const path& __p); ++ uintmax_t file_size(const path& __p, error_code& __ec) noexcept; ++ ++ uintmax_t hard_link_count(const path& __p); ++ uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept; ++ ++ inline bool ++ is_block_file(file_status __s) noexcept ++ { return __s.type() == file_type::block; } ++ ++ inline bool ++ is_block_file(const path& __p) ++ { return is_block_file(status(__p)); } ++ ++ inline bool ++ is_block_file(const path& __p, error_code& __ec) noexcept ++ { return is_block_file(status(__p, __ec)); } ++ ++ inline bool ++ is_character_file(file_status __s) noexcept ++ { return __s.type() == file_type::character; } ++ ++ inline bool ++ is_character_file(const path& __p) ++ { return is_character_file(status(__p)); } ++ ++ inline bool ++ is_character_file(const path& __p, error_code& __ec) noexcept ++ { return is_character_file(status(__p, __ec)); } ++ ++ inline bool ++ is_directory(file_status __s) noexcept ++ { return __s.type() == file_type::directory; } ++ ++ inline bool ++ is_directory(const path& __p) ++ { return is_directory(status(__p)); } ++ ++ inline bool ++ is_directory(const path& __p, error_code& __ec) noexcept ++ { return is_directory(status(__p, __ec)); } ++ ++ bool is_empty(const path& __p); ++ bool is_empty(const path& __p, error_code& __ec) noexcept; ++ ++ inline bool ++ is_fifo(file_status __s) noexcept ++ { return __s.type() == file_type::fifo; } ++ ++ inline bool ++ is_fifo(const path& __p) ++ { return is_fifo(status(__p)); } ++ ++ inline bool ++ is_fifo(const path& __p, error_code& __ec) noexcept ++ { return is_fifo(status(__p, __ec)); } ++ ++ inline bool ++ is_other(file_status __s) noexcept ++ { ++ return exists(__s) && !is_regular_file(__s) && !is_directory(__s) ++ && !is_symlink(__s); ++ } ++ ++ inline bool ++ is_other(const path& __p) ++ { return is_other(status(__p)); } ++ ++ inline bool ++ is_other(const path& __p, error_code& __ec) noexcept ++ { return is_other(status(__p, __ec)); } ++ ++ inline bool ++ is_regular_file(file_status __s) noexcept ++ { return __s.type() == file_type::regular; } ++ ++ inline bool ++ is_regular_file(const path& __p) ++ { return is_regular_file(status(__p)); } ++ ++ inline bool ++ is_regular_file(const path& __p, error_code& __ec) noexcept ++ { return is_regular_file(status(__p, __ec)); } ++ ++ inline bool ++ is_socket(file_status __s) noexcept ++ { return __s.type() == file_type::socket; } ++ ++ inline bool ++ is_socket(const path& __p) ++ { return is_socket(status(__p)); } ++ ++ inline bool ++ is_socket(const path& __p, error_code& __ec) noexcept ++ { return is_socket(status(__p, __ec)); } ++ ++ inline bool ++ is_symlink(file_status __s) noexcept ++ { return __s.type() == file_type::symlink; } ++ ++ inline bool ++ is_symlink(const path& __p) ++ { return is_symlink(symlink_status(__p)); } ++ ++ inline bool ++ is_symlink(const path& __p, error_code& __ec) noexcept ++ { return is_symlink(symlink_status(__p, __ec)); } ++ ++ file_time_type last_write_time(const path& __p); ++ file_time_type last_write_time(const path& __p, error_code& __ec) noexcept; ++ void last_write_time(const path& __p, file_time_type __new_time); ++ void last_write_time(const path& __p, file_time_type __new_time, ++ error_code& __ec) noexcept; ++ ++ void permissions(const path& __p, perms __prms); ++ void permissions(const path& __p, perms __prms, error_code& __ec) noexcept; ++ ++ path read_symlink(const path& __p); ++ path read_symlink(const path& __p, error_code& __ec); ++ ++ bool remove(const path& __p); ++ bool remove(const path& __p, error_code& __ec) noexcept; ++ ++ uintmax_t remove_all(const path& __p); ++ uintmax_t remove_all(const path& __p, error_code& __ec) noexcept; ++ ++ void rename(const path& __from, const path& __to); ++ void rename(const path& __from, const path& __to, error_code& __ec) noexcept; ++ ++ void resize_file(const path& __p, uintmax_t __size); ++ void resize_file(const path& __p, uintmax_t __size, error_code& __ec) noexcept; ++ ++ space_info space(const path& __p); ++ space_info space(const path& __p, error_code& __ec) noexcept; ++ ++ file_status status(const path& __p); ++ file_status status(const path& __p, error_code& __ec) noexcept; ++ ++ inline bool status_known(file_status __s) noexcept ++ { return __s.type() != file_type::none; } ++ ++ file_status symlink_status(const path& __p); ++ file_status symlink_status(const path& __p, error_code& __ec) noexcept; ++ ++ path system_complete(const path& __p); ++ path system_complete(const path& __p, error_code& __ec); ++ ++ path temp_directory_path(); ++ path temp_directory_path(error_code& __ec); ++ ++ // @} group filesystem ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace v1 ++} // namespace filesystem ++} // namespace experimental ++} // namespace std ++ ++#endif // C++11 ++ ++#endif // _GLIBCXX_EXPERIMENTAL_FS_OPS_H +Index: libstdc++-v3/include/experimental/filesystem +=================================================================== +--- a/src/libstdc++-v3/include/experimental/filesystem (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/experimental/filesystem (.../branches/gcc-5-branch) +@@ -0,0 +1,77 @@ ++// <experimental/filesystem> -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file experimental/filesystem ++ * This is a TS C++ Library header. ++ */ ++ ++#ifndef _GLIBCXX_EXPERIMENTAL_FILESYSTEM ++#define _GLIBCXX_EXPERIMENTAL_FILESYSTEM 1 ++ ++#pragma GCC system_header ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++ ++#include <experimental/fs_fwd.h> ++#include <experimental/fs_path.h> ++#include <experimental/fs_dir.h> ++#include <experimental/fs_ops.h> ++ ++#define __cpp_lib_experimental_filesystem 201406 ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++namespace experimental ++{ ++namespace filesystem ++{ ++inline namespace v1 ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++ /** ++ * @ingroup filesystem ++ */ ++ inline std::string filesystem_error::_M_gen_what() ++ { ++ std::string __what = "filesystem error: "; ++ __what += system_error::what(); ++ if (!_M_path1.empty()) ++ __what += " [" + _M_path1.string() + ']'; ++ if (!_M_path2.empty()) ++ __what += " [" + _M_path2.string() + ']'; ++ return __what; ++ } ++ ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace v1 ++} // namespace filesystem ++} // namespace experimental ++} // namespace std ++ ++#endif // C++11 ++ ++#endif // _GLIBCXX_EXPERIMENTAL_FILESYSTEM +Index: libstdc++-v3/include/experimental/fs_dir.h +=================================================================== +--- a/src/libstdc++-v3/include/experimental/fs_dir.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/experimental/fs_dir.h (.../branches/gcc-5-branch) +@@ -0,0 +1,326 @@ ++// Filesystem directory utilities -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file experimental/fs_dir.h ++ * This is an internal header file, included by other library headers. ++ * Do not attempt to use it directly. @headername{experimental/filesystem} ++ */ ++ ++#ifndef _GLIBCXX_EXPERIMENTAL_FS_DIR_H ++#define _GLIBCXX_EXPERIMENTAL_FS_DIR_H 1 ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++# include <typeinfo> ++# include <ext/concurrence.h> ++# include <bits/unique_ptr.h> ++# include <bits/shared_ptr.h> ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++namespace experimental ++{ ++namespace filesystem ++{ ++inline namespace v1 ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++ /** ++ * @ingroup filesystem ++ * @{ ++ */ ++ ++ class file_status ++ { ++ public: ++ // constructors ++ explicit ++ file_status(file_type __ft = file_type::none, ++ perms __prms = perms::unknown) noexcept ++ : _M_type(__ft), _M_perms(__prms) { } ++ ++ file_status(const file_status&) noexcept = default; ++ file_status(file_status&&) noexcept = default; ++ ~file_status() = default; ++ ++ file_status& operator=(const file_status&) noexcept = default; ++ file_status& operator=(file_status&&) noexcept = default; ++ ++ // observers ++ file_type type() const noexcept { return _M_type; } ++ perms permissions() const noexcept { return _M_perms; } ++ ++ // modifiers ++ void type(file_type __ft) noexcept { _M_type = __ft; } ++ void permissions(perms __prms) noexcept { _M_perms = __prms; } ++ ++ private: ++ file_type _M_type; ++ perms _M_perms; ++ }; ++ ++_GLIBCXX_BEGIN_NAMESPACE_CXX11 ++ ++ class directory_entry ++ { ++ public: ++ // constructors and destructor ++ directory_entry() noexcept = default; ++ directory_entry(const directory_entry&) = default; ++ directory_entry(directory_entry&&) noexcept = default; ++ explicit directory_entry(const filesystem::path& __p) : _M_path(__p) { } ++ ~directory_entry() = default; ++ ++ // modifiers ++ directory_entry& operator=(const directory_entry&) = default; ++ directory_entry& operator=(directory_entry&&) noexcept = default; ++ ++ void assign(const filesystem::path& __p) { _M_path = __p; } ++ ++ void ++ replace_filename(const filesystem::path& __p) ++ { _M_path = _M_path.parent_path() / __p; } ++ ++ // observers ++ const filesystem::path& path() const noexcept { return _M_path; } ++ operator const filesystem::path&() const noexcept { return _M_path; } ++ ++ file_status ++ status() const ++ { return filesystem::status(_M_path); } ++ ++ file_status ++ status(error_code& __ec) const noexcept ++ { return filesystem::status(_M_path, __ec); } ++ ++ file_status ++ symlink_status() const ++ { return filesystem::symlink_status(_M_path); } ++ ++ file_status ++ symlink_status(error_code& __ec) const noexcept ++ { return filesystem::symlink_status(_M_path, __ec); } ++ ++ bool ++ operator< (const directory_entry& __rhs) const noexcept ++ { return _M_path < __rhs._M_path; } ++ ++ bool ++ operator==(const directory_entry& __rhs) const noexcept ++ { return _M_path == __rhs._M_path; } ++ ++ bool ++ operator!=(const directory_entry& __rhs) const noexcept ++ { return _M_path != __rhs._M_path; } ++ ++ bool ++ operator<=(const directory_entry& __rhs) const noexcept ++ { return _M_path <= __rhs._M_path; } ++ ++ bool ++ operator> (const directory_entry& __rhs) const noexcept ++ { return _M_path > __rhs._M_path; } ++ ++ bool ++ operator>=(const directory_entry& __rhs) const noexcept ++ { return _M_path >= __rhs._M_path; } ++ ++ private: ++ filesystem::path _M_path; ++ }; ++ ++ struct _Dir; ++ class recursive_directory_iterator; ++ ++ class directory_iterator ++ { ++ public: ++ typedef directory_entry value_type; ++ typedef ptrdiff_t difference_type; ++ typedef const directory_entry* pointer; ++ typedef const directory_entry& reference; ++ typedef input_iterator_tag iterator_category; ++ ++ directory_iterator() noexcept = default; ++ ++ explicit ++ directory_iterator(const path& __p) ++ : directory_iterator(__p, directory_options::none, nullptr) { } ++ ++ directory_iterator(const path& __p, directory_options __options) ++ : directory_iterator(__p, __options, nullptr) { } ++ ++ directory_iterator(const path& __p, error_code& __ec) noexcept ++ : directory_iterator(__p, directory_options::none, __ec) { } ++ ++ directory_iterator(const path& __p, ++ directory_options __options, error_code& __ec) noexcept ++ : directory_iterator(__p, __options, &__ec) { } ++ ++ directory_iterator(const directory_iterator& __rhs) = default; ++ ++ directory_iterator(directory_iterator&& __rhs) noexcept = default; ++ ++ ~directory_iterator() = default; ++ ++ directory_iterator& operator=(const directory_iterator& __rhs) = default; ++ directory_iterator& operator=(directory_iterator&& __rhs) noexcept = default; ++ ++ const directory_entry& operator*() const; ++ const directory_entry* operator->() const { return &**this; } ++ directory_iterator& operator++(); ++ directory_iterator& increment(error_code& __ec) noexcept; ++ ++ directory_iterator operator++(int) ++ { ++ auto __tmp = *this; ++ ++*this; ++ return __tmp; ++ } ++ ++ friend bool ++ operator==(const directory_iterator& __lhs, ++ const directory_iterator& __rhs) ++ { return __lhs._M_dir == __rhs._M_dir; } ++ ++ private: ++ directory_iterator(const path&, directory_options, error_code*); ++ directory_iterator(std::shared_ptr<_Dir>, error_code*); ++ ++ friend class recursive_directory_iterator; ++ ++ std::shared_ptr<_Dir> _M_dir; ++ }; ++ ++ inline directory_iterator ++ begin(directory_iterator __iter) { return __iter; } ++ ++ inline directory_iterator ++ end(directory_iterator) { return directory_iterator(); } ++ ++ inline bool ++ operator!=(const directory_iterator& __lhs, const directory_iterator& __rhs) ++ { return !(__lhs == __rhs); } ++ ++ class recursive_directory_iterator ++ { ++ public: ++ typedef directory_entry value_type; ++ typedef ptrdiff_t difference_type; ++ typedef const directory_entry* pointer; ++ typedef const directory_entry& reference; ++ typedef input_iterator_tag iterator_category; ++ ++ recursive_directory_iterator() noexcept = default; ++ ++ explicit ++ recursive_directory_iterator(const path& __p) ++ : recursive_directory_iterator(__p, directory_options::none, nullptr) { } ++ ++ recursive_directory_iterator(const path& __p, directory_options __options) ++ : recursive_directory_iterator(__p, __options, nullptr) { } ++ ++ recursive_directory_iterator(const path& __p, ++ directory_options __options, ++ error_code& __ec) noexcept ++ : recursive_directory_iterator(__p, __options, &__ec) { } ++ ++ recursive_directory_iterator(const path& __p, error_code& __ec) noexcept ++ : recursive_directory_iterator(__p, directory_options::none, &__ec) { } ++ ++ recursive_directory_iterator( ++ const recursive_directory_iterator&) = default; ++ ++ recursive_directory_iterator( ++ recursive_directory_iterator&&) noexcept = default; ++ ++ ~recursive_directory_iterator(); ++ ++ // observers ++ directory_options options() const { return _M_options; } ++ int depth() const; ++ bool recursion_pending() const { return _M_pending; } ++ ++ const directory_entry& operator*() const; ++ const directory_entry* operator->() const { return &**this; } ++ ++ // modifiers ++ recursive_directory_iterator& ++ operator=(const recursive_directory_iterator& __rhs) noexcept; ++ recursive_directory_iterator& ++ operator=(recursive_directory_iterator&& __rhs) noexcept; ++ ++ recursive_directory_iterator& operator++(); ++ recursive_directory_iterator& increment(error_code& __ec) noexcept; ++ ++ recursive_directory_iterator operator++(int) ++ { ++ auto __tmp = *this; ++ ++*this; ++ return __tmp; ++ } ++ ++ void pop(); ++ ++ void disable_recursion_pending() { _M_pending = false; } ++ ++ friend bool ++ operator==(const recursive_directory_iterator& __lhs, ++ const recursive_directory_iterator& __rhs) ++ { return __lhs._M_dirs == __rhs._M_dirs; } ++ ++ private: ++ recursive_directory_iterator(const path&, directory_options, error_code*); ++ ++ struct _Dir_stack; ++ std::shared_ptr<_Dir_stack> _M_dirs; ++ directory_options _M_options; ++ bool _M_pending; ++ }; ++ ++ inline recursive_directory_iterator ++ begin(recursive_directory_iterator __iter) { return __iter; } ++ ++ inline recursive_directory_iterator ++ end(recursive_directory_iterator) { return recursive_directory_iterator(); } ++ ++ inline bool ++ operator!=(const recursive_directory_iterator& __lhs, ++ const recursive_directory_iterator& __rhs) ++ { return !(__lhs == __rhs); } ++ ++_GLIBCXX_END_NAMESPACE_CXX11 ++ ++ // @} group filesystem ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace v1 ++} // namespace filesystem ++} // namespace experimental ++} // namespace std ++ ++#endif // C++11 ++ ++#endif // _GLIBCXX_EXPERIMENTAL_FS_DIR_H +Index: libstdc++-v3/include/experimental/fs_fwd.h +=================================================================== +--- a/src/libstdc++-v3/include/experimental/fs_fwd.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/experimental/fs_fwd.h (.../branches/gcc-5-branch) +@@ -0,0 +1,289 @@ ++// Filesystem declarations -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file experimental/filesystem ++ * This is a TS C++ Library header. ++ */ ++ ++#ifndef _GLIBCXX_EXPERIMENTAL_FS_FWD_H ++#define _GLIBCXX_EXPERIMENTAL_FS_FWD_H 1 ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++ ++#include <system_error> ++#include <cstdint> ++#include <chrono> ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++namespace experimental ++{ ++namespace filesystem ++{ ++inline namespace v1 ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++#if _GLIBCXX_USE_CXX11_ABI ++ inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } ++#endif ++ ++ /** ++ * @defgroup filesystem ++ * @ingroup experimental ++ * ++ * Utilities for performing operations on file systems and their components, ++ * such as paths, regular files, and directories. ++ * ++ * @{ ++ */ ++ ++ class file_status; ++_GLIBCXX_BEGIN_NAMESPACE_CXX11 ++ class path; ++ class filesystem_error; ++ class directory_entry; ++ class directory_iterator; ++ class recursive_directory_iterator; ++_GLIBCXX_END_NAMESPACE_CXX11 ++ ++ struct space_info ++ { ++ uintmax_t capacity; ++ uintmax_t free; ++ uintmax_t available; ++ }; ++ ++ enum class file_type : signed char { ++ none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3, ++ block = 4, character = 5, fifo = 6, socket = 7, unknown = 8 ++ }; ++ ++ /// Bitmask type ++ enum class copy_options : unsigned short { ++ none = 0, ++ skip_existing = 1, overwrite_existing = 2, update_existing = 4, ++ recursive = 8, ++ copy_symlinks = 16, skip_symlinks = 32, ++ directories_only = 64, create_symlinks = 128, create_hard_links = 256 ++ }; ++ ++ constexpr copy_options ++ operator&(copy_options __x, copy_options __y) ++ { ++ using __utype = typename std::underlying_type<copy_options>::type; ++ return static_cast<copy_options>( ++ static_cast<__utype>(__x) & static_cast<__utype>(__y)); ++ } ++ ++ constexpr copy_options ++ operator|(copy_options __x, copy_options __y) ++ { ++ using __utype = typename std::underlying_type<copy_options>::type; ++ return static_cast<copy_options>( ++ static_cast<__utype>(__x) | static_cast<__utype>(__y)); ++ } ++ ++ constexpr copy_options ++ operator^(copy_options __x, copy_options __y) ++ { ++ using __utype = typename std::underlying_type<copy_options>::type; ++ return static_cast<copy_options>( ++ static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); ++ } ++ ++ constexpr copy_options ++ operator~(copy_options __x) ++ { ++ using __utype = typename std::underlying_type<copy_options>::type; ++ return static_cast<copy_options>(~static_cast<__utype>(__x)); ++ } ++ ++ inline copy_options& ++ operator&=(copy_options& __x, copy_options __y) ++ { return __x = __x & __y; } ++ ++ inline copy_options& ++ operator|=(copy_options& __x, copy_options __y) ++ { return __x = __x | __y; } ++ ++ inline copy_options& ++ operator^=(copy_options& __x, copy_options __y) ++ { return __x = __x ^ __y; } ++ ++ ++ /// Bitmask type ++ enum class perms : unsigned { ++ none = 0, ++ owner_read = 0400, ++ owner_write = 0200, ++ owner_exec = 0100, ++ owner_all = 0700, ++ group_read = 040, ++ group_write = 020, ++ group_exec = 010, ++ group_all = 070, ++ others_read = 04, ++ others_write = 02, ++ others_exec = 01, ++ others_all = 07, ++ all = 0777, ++ set_uid = 04000, ++ set_gid = 02000, ++ sticky_bit = 01000, ++ mask = 07777, ++ unknown = 0xFFFF, ++ add_perms = 0x10000, ++ remove_perms = 0x20000, ++ resolve_symlinks = 0x40000 ++ }; ++ ++ constexpr perms ++ operator&(perms __x, perms __y) ++ { ++ using __utype = typename std::underlying_type<perms>::type; ++ return static_cast<perms>( ++ static_cast<__utype>(__x) & static_cast<__utype>(__y)); ++ } ++ ++ constexpr perms ++ operator|(perms __x, perms __y) ++ { ++ using __utype = typename std::underlying_type<perms>::type; ++ return static_cast<perms>( ++ static_cast<__utype>(__x) | static_cast<__utype>(__y)); ++ } ++ ++ constexpr perms ++ operator^(perms __x, perms __y) ++ { ++ using __utype = typename std::underlying_type<perms>::type; ++ return static_cast<perms>( ++ static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); ++ } ++ ++ constexpr perms ++ operator~(perms __x) ++ { ++ using __utype = typename std::underlying_type<perms>::type; ++ return static_cast<perms>(~static_cast<__utype>(__x)); ++ } ++ ++ inline perms& ++ operator&=(perms& __x, perms __y) ++ { return __x = __x & __y; } ++ ++ inline perms& ++ operator|=(perms& __x, perms __y) ++ { return __x = __x | __y; } ++ ++ inline perms& ++ operator^=(perms& __x, perms __y) ++ { return __x = __x ^ __y; } ++ ++ // Bitmask type ++ enum class directory_options : unsigned char { ++ none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 ++ }; ++ ++ constexpr directory_options ++ operator&(directory_options __x, directory_options __y) ++ { ++ using __utype = typename std::underlying_type<directory_options>::type; ++ return static_cast<directory_options>( ++ static_cast<__utype>(__x) & static_cast<__utype>(__y)); ++ } ++ ++ constexpr directory_options ++ operator|(directory_options __x, directory_options __y) ++ { ++ using __utype = typename std::underlying_type<directory_options>::type; ++ return static_cast<directory_options>( ++ static_cast<__utype>(__x) | static_cast<__utype>(__y)); ++ } ++ ++ constexpr directory_options ++ operator^(directory_options __x, directory_options __y) ++ { ++ using __utype = typename std::underlying_type<directory_options>::type; ++ return static_cast<directory_options>( ++ static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); ++ } ++ ++ constexpr directory_options ++ operator~(directory_options __x) ++ { ++ using __utype = typename std::underlying_type<directory_options>::type; ++ return static_cast<directory_options>(~static_cast<__utype>(__x)); ++ } ++ ++ inline directory_options& ++ operator&=(directory_options& __x, directory_options __y) ++ { return __x = __x & __y; } ++ ++ inline directory_options& ++ operator|=(directory_options& __x, directory_options __y) ++ { return __x = __x | __y; } ++ ++ inline directory_options& ++ operator^=(directory_options& __x, directory_options __y) ++ { return __x = __x ^ __y; } ++ ++ typedef chrono::time_point<chrono::system_clock> file_time_type; ++ ++ // operational functions ++ ++ void copy(const path& __from, const path& __to, copy_options __options); ++ void copy(const path& __from, const path& __to, copy_options __options, ++ error_code&) noexcept; ++ ++ bool copy_file(const path& __from, const path& __to, copy_options __option); ++ bool copy_file(const path& __from, const path& __to, copy_options __option, ++ error_code&) noexcept; ++ ++ path current_path(); ++ ++ file_status status(const path&); ++ file_status status(const path&, error_code&) noexcept; ++ ++ bool status_known(file_status) noexcept; ++ ++ file_status symlink_status(const path&); ++ file_status symlink_status(const path&, error_code&) noexcept; ++ ++ bool is_regular_file(file_status) noexcept; ++ bool is_symlink(file_status) noexcept; ++ ++ // @} group filesystem ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace v1 ++} // namespace filesystem ++} // namespace experimental ++} // namespace std ++ ++#endif // C++11 ++ ++#endif // _GLIBCXX_EXPERIMENTAL_FS_FWD_H +Index: libstdc++-v3/include/experimental/fs_path.h +=================================================================== +--- a/src/libstdc++-v3/include/experimental/fs_path.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/experimental/fs_path.h (.../branches/gcc-5-branch) +@@ -0,0 +1,1016 @@ ++// Class filesystem::path -*- C++ -*- ++ ++// Copyright (C) 2014-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file experimental/fs_path.h ++ * This is an internal header file, included by other library headers. ++ * Do not attempt to use it directly. @headername{experimental/filesystem} ++ */ ++ ++#ifndef _GLIBCXX_EXPERIMENTAL_FS_PATH_H ++#define _GLIBCXX_EXPERIMENTAL_FS_PATH_H 1 ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++ ++#include <utility> ++#include <type_traits> ++#include <vector> ++#include <locale> ++#include <iosfwd> ++#include <codecvt> ++#include <system_error> ++#include <bits/stl_algobase.h> ++#include <bits/quoted_string.h> ++#include <bits/locale_conv.h> ++ ++#if defined(_WIN32) && !defined(__CYGWIN__) ++# define _GLIBCXX_FILESYSTEM_IS_WINDOWS 1 ++# include <algorithm> ++#endif ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++namespace experimental ++{ ++namespace filesystem ++{ ++inline namespace v1 ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++_GLIBCXX_BEGIN_NAMESPACE_CXX11 ++ ++ /** ++ * @ingroup filesystem ++ * @{ ++ */ ++ ++ /// A filesystem path. ++ class path ++ { ++ template<typename _CharT> ++ struct __is_encoded_char : std::false_type { }; ++ ++ template<typename _Iter, ++ typename _Iter_traits = std::iterator_traits<_Iter>> ++ using __is_path_iter_src ++ = __and_<__is_encoded_char<typename _Iter_traits::value_type>, ++ std::is_base_of<std::input_iterator_tag, ++ typename _Iter_traits::iterator_category>>; ++ ++ template<typename _Iter> ++ static __is_path_iter_src<_Iter> ++ __is_path_src(_Iter, int); ++ ++ template<typename _CharT, typename _Traits, typename _Alloc> ++ static __is_encoded_char<_CharT> ++ __is_path_src(const basic_string<_CharT, _Traits, _Alloc>&, int); ++ ++ template<typename _Unknown> ++ static std::false_type ++ __is_path_src(const _Unknown&, ...); ++ ++ template<typename _Tp1, typename _Tp2> ++ struct __constructible_from; ++ ++ template<typename _Iter> ++ struct __constructible_from<_Iter, _Iter> ++ : __is_path_iter_src<_Iter> ++ { }; ++ ++ template<typename _Source> ++ struct __constructible_from<_Source, void> ++ : decltype(__is_path_src(std::declval<_Source>(), 0)) ++ { }; ++ ++ template<typename _Tp1, typename _Tp2 = void> ++ using _Path = typename ++ std::enable_if<__and_<__not_<is_same<_Tp1, path>>, ++ __constructible_from<_Tp1, _Tp2>>::value, ++ path>::type; ++ ++ template<typename _Source> ++ static _Source ++ _S_range_begin(_Source __begin) { return __begin; } ++ ++ struct __null_terminated { }; ++ ++ template<typename _Source> ++ static __null_terminated ++ _S_range_end(_Source) { return {}; } ++ ++ template<typename _CharT, typename _Traits, typename _Alloc> ++ static const _CharT* ++ _S_range_begin(const basic_string<_CharT, _Traits, _Alloc>& __str) ++ { return __str.data(); } ++ ++ template<typename _CharT, typename _Traits, typename _Alloc> ++ static const _CharT* ++ _S_range_end(const basic_string<_CharT, _Traits, _Alloc>& __str) ++ { return __str.data() + __str.size(); } ++ ++ template<typename _Tp, ++ typename _Iter = decltype(_S_range_begin(std::declval<_Tp>())), ++ typename _Val = typename std::iterator_traits<_Iter>::value_type> ++ using __value_type_is_char ++ = typename std::enable_if<std::is_same<_Val, char>::value>::type; ++ ++ public: ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ typedef wchar_t value_type; ++ static constexpr value_type preferred_separator = L'\\'; ++#else ++ typedef char value_type; ++ static constexpr value_type preferred_separator = '/'; ++#endif ++ typedef std::basic_string<value_type> string_type; ++ ++ // constructors and destructor ++ ++ path() noexcept { } ++ ++ path(const path& __p) = default; ++ ++ path(path&& __p) noexcept ++ : _M_pathname(std::move(__p._M_pathname)), _M_type(__p._M_type) ++ { ++ _M_split_cmpts(); ++ __p.clear(); ++ } ++ ++ template<typename _Source, ++ typename _Require = _Path<_Source>> ++ path(_Source const& __source) ++ : _M_pathname(_S_convert(_S_range_begin(__source), ++ _S_range_end(__source))) ++ { _M_split_cmpts(); } ++ ++ template<typename _InputIterator, ++ typename _Require = _Path<_InputIterator, _InputIterator>> ++ path(_InputIterator __first, _InputIterator __last) ++ : _M_pathname(_S_convert(__first, __last)) ++ { _M_split_cmpts(); } ++ ++ template<typename _Source, ++ typename _Require = _Path<_Source>, ++ typename _Require2 = __value_type_is_char<_Source>> ++ path(_Source const& __source, const locale& __loc) ++ : _M_pathname(_S_convert_loc(_S_range_begin(__source), ++ _S_range_end(__source), __loc)) ++ { _M_split_cmpts(); } ++ ++ template<typename _InputIterator, ++ typename _Require = _Path<_InputIterator, _InputIterator>, ++ typename _Require2 = __value_type_is_char<_InputIterator>> ++ path(_InputIterator __first, _InputIterator __last, const locale& __loc) ++ : _M_pathname(_S_convert_loc(__first, __last, __loc)) ++ { _M_split_cmpts(); } ++ ++ ~path() = default; ++ ++ // assignments ++ ++ path& operator=(const path& __p) = default; ++ path& operator=(path&& __p) noexcept; ++ ++ template<typename _Source> ++ _Path<_Source>& ++ operator=(_Source const& __source) ++ { return *this = path(__source); } ++ ++ template<typename _Source> ++ _Path<_Source>& ++ assign(_Source const& __source) ++ { return *this = path(__source); } ++ ++ template<typename _InputIterator> ++ _Path<_InputIterator, _InputIterator>& ++ assign(_InputIterator __first, _InputIterator __last) ++ { return *this = path(__first, __last); } ++ ++ // appends ++ ++ path& operator/=(const path& __p) { return _M_append(__p._M_pathname); } ++ ++ template <class _Source> ++ _Path<_Source>& ++ operator/=(_Source const& __source) ++ { return append(__source); } ++ ++ template<typename _Source> ++ _Path<_Source>& ++ append(_Source const& __source) ++ { ++ return _M_append(_S_convert(_S_range_begin(__source), ++ _S_range_end(__source))); ++ } ++ ++ template<typename _InputIterator> ++ _Path<_InputIterator, _InputIterator>& ++ append(_InputIterator __first, _InputIterator __last) ++ { return _M_append(_S_convert(__first, __last)); } ++ ++ // concatenation ++ ++ path& operator+=(const path& __x); ++ path& operator+=(const string_type& __x); ++ path& operator+=(const value_type* __x); ++ path& operator+=(value_type __x); ++ ++ template<typename _Source> ++ _Path<_Source>& ++ operator+=(_Source const& __x) { return concat(__x); } ++ ++ template<typename _CharT> ++ _Path<_CharT*, _CharT*>& ++ operator+=(_CharT __x); ++ ++ template<typename _Source> ++ _Path<_Source>& ++ concat(_Source const& __x) ++ { return *this += _S_convert(_S_range_begin(__x), _S_range_end(__x)); } ++ ++ template<typename _InputIterator> ++ _Path<_InputIterator, _InputIterator>& ++ concat(_InputIterator __first, _InputIterator __last) ++ { return *this += _S_convert(__first, __last); } ++ ++ // modifiers ++ ++ void clear() noexcept { _M_pathname.clear(); _M_split_cmpts(); } ++ ++ path& make_preferred(); ++ path& remove_filename(); ++ path& replace_filename(const path& __replacement); ++ path& replace_extension(const path& __replacement = path()); ++ ++ void swap(path& __rhs) noexcept; ++ ++ // native format observers ++ ++ const string_type& native() const noexcept { return _M_pathname; } ++ const value_type* c_str() const noexcept { return _M_pathname.c_str(); } ++ operator string_type() const { return _M_pathname; } ++ ++ template<typename _CharT, typename _Traits = std::char_traits<_CharT>, ++ typename _Allocator = std::allocator<_CharT>> ++ std::basic_string<_CharT, _Traits, _Allocator> ++ string(const _Allocator& __a = _Allocator()) const; ++ ++ std::string string() const; ++ std::wstring wstring() const; ++ std::string u8string() const; ++ std::u16string u16string() const; ++ std::u32string u32string() const; ++ ++ // generic format observers ++ template<typename _CharT, typename _Traits = std::char_traits<_CharT>, ++ typename _Allocator = std::allocator<_CharT>> ++ std::basic_string<_CharT, _Traits, _Allocator> ++ generic_string(const _Allocator& __a = _Allocator()) const; ++ ++ std::string generic_string() const; ++ std::wstring generic_wstring() const; ++ std::string generic_u8string() const; ++ std::u16string generic_u16string() const; ++ std::u32string generic_u32string() const; ++ ++ // compare ++ ++ int compare(const path& __p) const noexcept; ++ int compare(const string_type& __s) const; ++ int compare(const value_type* __s) const; ++ ++ // decomposition ++ ++ path root_name() const; ++ path root_directory() const; ++ path root_path() const; ++ path relative_path() const; ++ path parent_path() const; ++ path filename() const; ++ path stem() const; ++ path extension() const; ++ ++ // query ++ ++ bool empty() const noexcept { return _M_pathname.empty(); } ++ bool has_root_name() const; ++ bool has_root_directory() const; ++ bool has_root_path() const; ++ bool has_relative_path() const; ++ bool has_parent_path() const; ++ bool has_filename() const; ++ bool has_stem() const; ++ bool has_extension() const; ++ bool is_absolute() const; ++ bool is_relative() const { return !is_absolute(); } ++ ++ // iterators ++ class iterator; ++ typedef iterator const_iterator; ++ ++ iterator begin() const; ++ iterator end() const; ++ ++ private: ++ enum class _Type : unsigned char { ++ _Multi, _Root_name, _Root_dir, _Filename ++ }; ++ ++ path(string_type __str, _Type __type) : _M_pathname(__str), _M_type(__type) ++ { ++ _GLIBCXX_DEBUG_ASSERT(!empty()); ++ _GLIBCXX_DEBUG_ASSERT(_M_type != _Type::_Multi); ++ } ++ ++ enum class _Split { _Stem, _Extension }; ++ ++ path& _M_append(const string_type& __str) ++ { ++ if (!_M_pathname.empty() && !_S_is_dir_sep(_M_pathname.back()) ++ && !__str.empty() && !_S_is_dir_sep(__str.front())) ++ _M_pathname += preferred_separator; ++ _M_pathname += __str; ++ _M_split_cmpts(); ++ return *this; ++ } ++ ++ pair<const string_type*, size_t> _M_find_extension() const; ++ ++ template<typename _CharT> ++ struct _Cvt; ++ ++ static string_type ++ _S_convert(value_type* __src, __null_terminated) ++ { return string_type(__src); } ++ ++ static string_type ++ _S_convert(const value_type* __src, __null_terminated) ++ { return string_type(__src); } ++ ++ template<typename _Iter> ++ static string_type ++ _S_convert(_Iter __first, _Iter __last) ++ { ++ using __value_type = typename std::iterator_traits<_Iter>::value_type; ++ return _Cvt<__value_type>::_S_convert(__first, __last); ++ } ++ ++ template<typename _InputIterator> ++ static string_type ++ _S_convert(_InputIterator __src, __null_terminated) ++ { ++ using _Tp = typename std::iterator_traits<_InputIterator>::value_type; ++ std::basic_string<_Tp> __tmp; ++ while (*__src != _Tp{}) ++ __tmp.push_back(*__src++); ++ return _S_convert(__tmp.data(), __tmp.data() + __tmp.size()); ++ } ++ ++ static string_type ++ _S_convert_loc(const char* __first, const char* __last, ++ const std::locale& __loc); ++ ++ template<typename _Iter> ++ static string_type ++ _S_convert_loc(_Iter __first, _Iter __last, const std::locale& __loc) ++ { ++ const std::string __str(__first, __last); ++ return _S_convert_loc(__str.data(), __str.data()+__str.size(), __loc); ++ } ++ ++ template<typename _InputIterator> ++ static string_type ++ _S_convert_loc(_InputIterator __src, __null_terminated, ++ const std::locale& __loc) ++ { ++ std::string __tmp; ++ while (*__src != '\0') ++ __tmp.push_back(*__src++); ++ return _S_convert_loc(__tmp.data(), __tmp.data()+__tmp.size(), __loc); ++ } ++ ++ bool _S_is_dir_sep(value_type __ch) ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ return __ch == L'/' || __ch == preferred_separator; ++#else ++ return __ch == '/'; ++#endif ++ } ++ ++ void _M_split_cmpts(); ++ void _M_trim(); ++ void _M_add_root_name(size_t __n); ++ void _M_add_root_dir(size_t __pos); ++ void _M_add_filename(size_t __pos, size_t __n); ++ ++ string_type _M_pathname; ++ ++ struct _Cmpt; ++ using _List = _GLIBCXX_STD_C::vector<_Cmpt>; ++ _List _M_cmpts; // empty unless _M_type == _Type::_Multi ++ _Type _M_type = _Type::_Multi; ++ }; ++ ++ inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); } ++ ++ size_t hash_value(const path& __p) noexcept; ++ ++ /// Compare paths ++ inline bool operator<(const path& __lhs, const path& __rhs) noexcept ++ { return __lhs.compare(__rhs) < 0; } ++ ++ /// Compare paths ++ inline bool operator<=(const path& __lhs, const path& __rhs) noexcept ++ { return !(__rhs < __lhs); } ++ ++ /// Compare paths ++ inline bool operator>(const path& __lhs, const path& __rhs) noexcept ++ { return __rhs < __lhs; } ++ ++ /// Compare paths ++ inline bool operator>=(const path& __lhs, const path& __rhs) noexcept ++ { return !(__lhs < __rhs); } ++ ++ /// Compare paths ++ inline bool operator==(const path& __lhs, const path& __rhs) noexcept ++ { return __lhs.compare(__rhs) == 0; } ++ ++ /// Compare paths ++ inline bool operator!=(const path& __lhs, const path& __rhs) noexcept ++ { return !(__lhs == __rhs); } ++ ++ /// Append one path to another ++ inline path operator/(const path& __lhs, const path& __rhs) ++ { return path(__lhs) /= __rhs; } ++ ++ /// Write a path to a stream ++ template<typename _CharT, typename _Traits> ++ basic_ostream<_CharT, _Traits>& ++ operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) ++ { ++ auto __tmp = __p.string<_CharT, _Traits>(); ++ using __quoted_string ++ = std::__detail::_Quoted_string<decltype(__tmp)&, _CharT>; ++ __os << __quoted_string{__tmp, '"', '\\'}; ++ return __os; ++ } ++ ++ /// Read a path from a stream ++ template<typename _CharT, typename _Traits> ++ basic_istream<_CharT, _Traits>& ++ operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) ++ { ++ basic_string<_CharT, _Traits> __tmp; ++ using __quoted_string ++ = std::__detail::_Quoted_string<decltype(__tmp)&, _CharT>; ++ if (__is >> __quoted_string{ __tmp, '"', '\\' }) ++ __p = std::move(__tmp); ++ return __is; ++ } ++ ++ // TODO constrain with _Path<Source> and __value_type_is_char ++ template<typename _Source> ++ inline path ++ u8path(const _Source& __source) ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ return path{ path::string_type{__source} }; ++#else ++ return path{ __source }; ++#endif ++ } ++ ++ // TODO constrain with _Path<InputIterator, InputIterator> and __value_type_is_char ++ template<typename _InputIterator> ++ inline path ++ u8path(_InputIterator __first, _InputIterator __last) ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ return path{ path::string_type{__first, __last} }; ++#else ++ return path{ __first, __last }; ++#endif ++ } ++ ++ class filesystem_error : public std::system_error ++ { ++ public: ++ filesystem_error(const string& __what_arg, error_code __ec) ++ : system_error(__ec, __what_arg) { } ++ ++ filesystem_error(const string& __what_arg, const path& __p1, ++ error_code __ec) ++ : system_error(__ec, __what_arg), _M_path1(__p1) { } ++ ++ filesystem_error(const string& __what_arg, const path& __p1, ++ const path& __p2, error_code __ec) ++ : system_error(__ec, __what_arg), _M_path1(__p1), _M_path2(__p2) ++ { } ++ ++ ~filesystem_error(); ++ ++ const path& path1() const noexcept { return _M_path1; } ++ const path& path2() const noexcept { return _M_path2; } ++ const char* what() const noexcept { return _M_what.c_str(); } ++ ++ private: ++ std::string _M_gen_what(); ++ ++ path _M_path1; ++ path _M_path2; ++ std::string _M_what = _M_gen_what(); ++ }; ++ ++ struct path::_Cmpt : path ++ { ++ _Cmpt(string_type __s, _Type __t, size_t __pos) ++ : path(std::move(__s), __t), _M_pos(__pos) { } ++ ++ _Cmpt() : _M_pos(-1) { } ++ ++ size_t _M_pos; ++ }; ++ ++ template<> ++ struct path::__is_encoded_char<char> : std::true_type ++ { using value_type = char; }; ++ ++ template<> ++ struct path::__is_encoded_char<wchar_t> : std::true_type ++ { using value_type = wchar_t; }; ++ ++ template<> ++ struct path::__is_encoded_char<char16_t> : std::true_type ++ { using value_type = char16_t; }; ++ ++ template<> ++ struct path::__is_encoded_char<char32_t> : std::true_type ++ { using value_type = char32_t; }; ++ ++ // specialize _Cvt for degenerate 'noconv' case ++ template<> ++ struct path::_Cvt<path::value_type> ++ { ++ template<typename _Iter> ++ static string_type ++ _S_convert(_Iter __first, _Iter __last) ++ { return string_type{__first, __last}; } ++ }; ++ ++ template<typename _CharT> ++ struct path::_Cvt ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ static string_type ++ _S_wconvert(const char* __f, const char* __l, true_type) ++ { ++ using _Cvt = std::codecvt<wchar_t, char, mbstate_t>; ++ const auto& __cvt = std::use_facet<_Cvt>(std::locale{}); ++ std::wstring __wstr; ++ if (__str_codecvt_in(__f, __l, __wstr, __cvt)) ++ return __wstr; ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++ } ++ ++ static string_type ++ _S_wconvert(const _CharT* __f, const _CharT* __l, false_type) ++ { ++ std::codecvt_utf8<_CharT> __cvt; ++ std::string __str; ++ if (__str_codecvt_out(__f, __l, __str, __cvt)) ++ { ++ const char* __f2 = __str.data(); ++ const char* __l2 = __f2 + __str.size(); ++ std::codecvt_utf8<wchar_t> __wcvt; ++ std::wstring __wstr; ++ if (__str_codecvt_in(__f2, __l2, __wstr, __wcvt)) ++ return __wstr; ++ } ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++ } ++ ++ static string_type ++ _S_convert(const _CharT* __f, const _CharT* __l) ++ { ++ return _S_wconvert(__f, __l, is_same<_CharT, char>{}); ++ } ++#else ++ static string_type ++ _S_convert(const _CharT* __f, const _CharT* __l) ++ { ++ std::codecvt_utf8<_CharT> __cvt; ++ std::string __str; ++ if (__str_codecvt_out(__f, __l, __str, __cvt)) ++ return __str; ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++ } ++#endif ++ ++ static string_type ++ _S_convert(_CharT* __f, _CharT* __l) ++ { ++ return _S_convert(const_cast<const _CharT*>(__f), ++ const_cast<const _CharT*>(__l)); ++ } ++ ++ template<typename _Iter> ++ static string_type ++ _S_convert(_Iter __first, _Iter __last) ++ { ++ const std::basic_string<_CharT> __str(__first, __last); ++ return _S_convert(__str.data(), __str.data() + __str.size()); ++ } ++ ++ template<typename _Iter, typename _Cont> ++ static string_type ++ _S_convert(__gnu_cxx::__normal_iterator<_Iter, _Cont> __first, ++ __gnu_cxx::__normal_iterator<_Iter, _Cont> __last) ++ { return _S_convert(__first.base(), __last.base()); } ++ }; ++ ++ /// An iterator for the components of a path ++ class path::iterator ++ { ++ public: ++ using difference_type = std::ptrdiff_t; ++ using value_type = path; ++ using reference = const path&; ++ using pointer = const path*; ++ using iterator_category = std::bidirectional_iterator_tag; ++ ++ iterator() : _M_path(nullptr), _M_cur(), _M_at_end() { } ++ ++ iterator(const iterator&) = default; ++ iterator& operator=(const iterator&) = default; ++ ++ reference operator*() const; ++ pointer operator->() const { return std::__addressof(**this); } ++ ++ iterator& operator++(); ++ iterator operator++(int) { auto __tmp = *this; ++_M_cur; return __tmp; } ++ ++ iterator& operator--(); ++ iterator operator--(int) { auto __tmp = *this; --_M_cur; return __tmp; } ++ ++ friend bool operator==(const iterator& __lhs, const iterator& __rhs) ++ { return __lhs._M_equals(__rhs); } ++ ++ friend bool operator!=(const iterator& __lhs, const iterator& __rhs) ++ { return !__lhs._M_equals(__rhs); } ++ ++ private: ++ friend class path; ++ ++ iterator(const path* __path, path::_List::const_iterator __iter) ++ : _M_path(__path), _M_cur(__iter), _M_at_end() ++ { } ++ ++ iterator(const path* __path, bool __at_end) ++ : _M_path(__path), _M_cur(), _M_at_end(__at_end) ++ { } ++ ++ bool _M_equals(iterator) const; ++ ++ const path* _M_path; ++ path::_List::const_iterator _M_cur; ++ bool _M_at_end; // only used when type != _Multi ++ }; ++ ++ ++ inline path& ++ path::operator=(path&& __p) noexcept ++ { ++ _M_pathname = std::move(__p._M_pathname); ++ _M_cmpts = std::move(__p._M_cmpts); ++ _M_type = __p._M_type; ++ __p.clear(); ++ return *this; ++ } ++ ++ inline path& ++ path::operator+=(const path& __p) ++ { ++ return operator+=(__p.native()); ++ } ++ ++ inline path& ++ path::operator+=(const string_type& __x) ++ { ++ _M_pathname += __x; ++ _M_split_cmpts(); ++ return *this; ++ } ++ ++ inline path& ++ path::operator+=(const value_type* __x) ++ { ++ _M_pathname += __x; ++ _M_split_cmpts(); ++ return *this; ++ } ++ ++ inline path& ++ path::operator+=(value_type __x) ++ { ++ _M_pathname += __x; ++ _M_split_cmpts(); ++ return *this; ++ } ++ ++ template<typename _CharT> ++ inline path::_Path<_CharT*, _CharT*>& ++ path::operator+=(_CharT __x) ++ { ++ auto* __addr = std::__addressof(__x); ++ return concat(__addr, __addr + 1); ++ } ++ ++ inline path& ++ path::make_preferred() ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ std::replace(_M_pathname.begin(), _M_pathname.end(), L'/', ++ preferred_separator); ++#endif ++ return *this; ++ } ++ ++ inline void path::swap(path& __rhs) noexcept ++ { ++ _M_pathname.swap(__rhs._M_pathname); ++ _M_cmpts.swap(__rhs._M_cmpts); ++ std::swap(_M_type, __rhs._M_type); ++ } ++ ++ template<typename _CharT, typename _Traits, typename _Allocator> ++ inline std::basic_string<_CharT, _Traits, _Allocator> ++ path::string(const _Allocator& __a) const ++ { ++ if (is_same<_CharT, value_type>::value) ++ return { _M_pathname.begin(), _M_pathname.end(), __a }; ++ ++ const value_type* __first = _M_pathname.data(); ++ const value_type* __last = __first + _M_pathname.size(); ++ ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ using _CharAlloc = __alloc_rebind<_Allocator, char>; ++ using _String = basic_string<char, char_traits<char>, _CharAlloc>; ++ using _WString = basic_string<_CharT, _Traits, _Allocator>; ++ ++ // use codecvt_utf8<wchar_t> to convert native string to UTF-8 ++ codecvt_utf8<value_type> __cvt; ++ _String __u8str{_CharAlloc{__a}}; ++ if (__str_codecvt_out(__first, __last, __u8str, __cvt)) ++ { ++ struct ++ { ++ const _String* ++ operator()(const _String& __from, _String&, true_type) ++ { return std::__addressof(__from); } ++ ++ _WString* ++ operator()(const _String& __from, _WString& __to, false_type) ++ { ++ // use codecvt_utf8<_CharT> to convert UTF-8 to wide string ++ codecvt_utf8<_CharT> __cvt; ++ const char* __f = __from.data(); ++ const char* __l = __f + __from.size(); ++ if (__str_codecvt_in(__f, __l, __to, __cvt)) ++ return std::__addressof(__to); ++ return nullptr; ++ } ++ } __dispatch; ++ _WString __wstr; ++ if (auto* __p = __dispatch(__u8str, __wstr, is_same<_CharT, char>{})) ++ return *__p; ++ } ++#else ++ codecvt_utf8<_CharT> __cvt; ++ basic_string<_CharT, _Traits, _Allocator> __wstr{__a}; ++ if (__str_codecvt_in(__first, __last, __wstr, __cvt)) ++ return __wstr; ++#endif ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++ } ++ ++ inline std::string ++ path::string() const { return string<char>(); } ++ ++ inline std::wstring ++ path::wstring() const { return string<wchar_t>(); } ++ ++ inline std::string ++ path::u8string() const ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ std::string __str; ++ // convert from native encoding to UTF-8 ++ codecvt_utf8<value_type> __cvt; ++ const value_type* __first = _M_pathname.data(); ++ const value_type* __last = __first + _M_pathname.size(); ++ if (__str_codecvt_out(__first, __last, __str, __cvt)) ++ return __str; ++ _GLIBCXX_THROW_OR_ABORT(filesystem_error( ++ "Cannot convert character sequence", ++ std::make_error_code(errc::illegal_byte_sequence))); ++#else ++ return _M_pathname; ++#endif ++ } ++ ++ inline std::u16string ++ path::u16string() const { return string<char16_t>(); } ++ ++ inline std::u32string ++ path::u32string() const { return string<char32_t>(); } ++ ++#ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ template<typename _CharT, typename _Traits, typename _Allocator> ++ inline std::basic_string<_CharT, _Traits, _Allocator> ++ path::generic_string(const _Allocator& __a) const ++ { return string<_CharT, _Traits, _Allocator>(__a); } ++ ++ inline std::string ++ path::generic_string() const { return string(); } ++ ++ inline std::wstring ++ path::generic_wstring() const { return wstring(); } ++ ++ inline std::string ++ path::generic_u8string() const { return u8string(); } ++ ++ inline std::u16string ++ path::generic_u16string() const { return u16string(); } ++ ++ inline std::u32string ++ path::generic_u32string() const { return u32string(); } ++#endif ++ ++ inline int ++ path::compare(const string_type& __s) const { return compare(path(__s)); } ++ ++ inline int ++ path::compare(const value_type* __s) const { return compare(path(__s)); } ++ ++ inline path ++ path::filename() const { return empty() ? path() : *--end(); } ++ ++ inline path ++ path::stem() const ++ { ++ auto ext = _M_find_extension(); ++ if (ext.first && ext.second != 0) ++ return path{ext.first->substr(0, ext.second)}; ++ return {}; ++ } ++ ++ inline path ++ path::extension() const ++ { ++ auto ext = _M_find_extension(); ++ if (ext.first && ext.second != string_type::npos) ++ return path{ext.first->substr(ext.second)}; ++ return {}; ++ } ++ ++ inline bool ++ path::has_stem() const ++ { ++ auto ext = _M_find_extension(); ++ return ext.first && ext.second != 0; ++ } ++ ++ inline bool ++ path::has_extension() const ++ { ++ auto ext = _M_find_extension(); ++ return ext.first && ext.second != string_type::npos; ++ } ++ ++ inline bool ++ path::is_absolute() const ++ { ++#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++ return has_root_name(); ++#else ++ return has_root_directory(); ++#endif ++ } ++ ++ inline path::iterator ++ path::begin() const ++ { ++ if (_M_type == _Type::_Multi) ++ return iterator(this, _M_cmpts.begin()); ++ return iterator(this, false); ++ } ++ ++ inline path::iterator ++ path::end() const ++ { ++ if (_M_type == _Type::_Multi) ++ return iterator(this, _M_cmpts.end()); ++ return iterator(this, true); ++ } ++ ++ inline path::iterator& ++ path::iterator::operator++() ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_path != nullptr); ++ if (_M_path->_M_type == _Type::_Multi) ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_cur != _M_path->_M_cmpts.end()); ++ ++_M_cur; ++ } ++ else ++ { ++ _GLIBCXX_DEBUG_ASSERT(!_M_at_end); ++ _M_at_end = true; ++ } ++ return *this; ++ } ++ ++ inline path::iterator& ++ path::iterator::operator--() ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_path != nullptr); ++ if (_M_path->_M_type == _Type::_Multi) ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_cur != _M_path->_M_cmpts.begin()); ++ --_M_cur; ++ } ++ else ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_at_end); ++ _M_at_end = false; ++ } ++ return *this; ++ } ++ ++ inline path::iterator::reference ++ path::iterator::operator*() const ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_path != nullptr); ++ if (_M_path->_M_type == _Type::_Multi) ++ { ++ _GLIBCXX_DEBUG_ASSERT(_M_cur != _M_path->_M_cmpts.end()); ++ return *_M_cur; ++ } ++ return *_M_path; ++ } ++ ++ inline bool ++ path::iterator::_M_equals(iterator __rhs) const ++ { ++ if (_M_path != __rhs._M_path) ++ return false; ++ if (_M_path == nullptr) ++ return true; ++ if (_M_path->_M_type == path::_Type::_Multi) ++ return _M_cur == __rhs._M_cur; ++ return _M_at_end == __rhs._M_at_end; ++ } ++ ++ // @} group filesystem ++_GLIBCXX_END_NAMESPACE_CXX11 ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace v1 ++} // namespace filesystem ++} // namespace experimental ++} // namespace std ++ ++#endif // C++11 ++ ++#endif // _GLIBCXX_EXPERIMENTAL_FS_PATH_H Index: libstdc++-v3/include/bits/regex_compiler.h =================================================================== --- a/src/libstdc++-v3/include/bits/regex_compiler.h (.../tags/gcc_5_2_0_release) @@ -47,6 +6880,404 @@ Index: libstdc++-v3/include/bits/regex_compiler.h } void +Index: libstdc++-v3/include/bits/locale_conv.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/locale_conv.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/bits/locale_conv.h (.../branches/gcc-5-branch) +@@ -51,7 +51,114 @@ + * @{ + */ + ++ template<typename _OutStr, typename _InChar, typename _Codecvt, ++ typename _State, typename _Fn> ++ bool ++ __do_str_codecvt(const _InChar* __first, const _InChar* __last, ++ _OutStr& __outstr, const _Codecvt& __cvt, _State& __state, ++ size_t& __count, _Fn __fn) ++ { ++ if (__first == __last) ++ { ++ __outstr.clear(); ++ __count = 0; ++ return true; ++ } ++ ++ size_t __outchars = 0; ++ auto __next = __first; ++ const auto __maxlen = __cvt.max_length() + 1; ++ ++ codecvt_base::result __result; ++ do ++ { ++ __outstr.resize(__outstr.size() + (__last - __next) * __maxlen); ++ auto __outnext = &__outstr.front() + __outchars; ++ auto const __outlast = &__outstr.back() + 1; ++ __result = (__cvt.*__fn)(__state, __next, __last, __next, ++ __outnext, __outlast, __outnext); ++ __outchars = __outnext - &__outstr.front(); ++ } ++ while (__result == codecvt_base::partial && __next != __last ++ && (__outstr.size() - __outchars) < __maxlen); ++ ++ if (__result == codecvt_base::error) ++ return false; ++ ++ if (__result == codecvt_base::noconv) ++ { ++ __outstr.assign(__first, __last); ++ __count = __last - __first; ++ } ++ else ++ { ++ __outstr.resize(__outchars); ++ __count = __next - __first; ++ } ++ ++ return true; ++ } ++ ++ // Convert narrow character string to wide. ++ template<typename _CharT, typename _Traits, typename _Alloc, typename _State> ++ inline bool ++ __str_codecvt_in(const char* __first, const char* __last, ++ basic_string<_CharT, _Traits, _Alloc>& __outstr, ++ const codecvt<_CharT, char, _State>& __cvt, ++ _State& __state, size_t& __count) ++ { ++ using _Codecvt = codecvt<_CharT, char, _State>; ++ using _ConvFn ++ = codecvt_base::result ++ (_Codecvt::*)(_State&, const char*, const char*, const char*&, ++ _CharT*, _CharT*, _CharT*&) const; ++ _ConvFn __fn = &codecvt<_CharT, char, _State>::in; ++ return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, ++ __count, __fn); ++ } ++ ++ template<typename _CharT, typename _Traits, typename _Alloc, typename _State> ++ inline bool ++ __str_codecvt_in(const char* __first, const char* __last, ++ basic_string<_CharT, _Traits, _Alloc>& __outstr, ++ const codecvt<_CharT, char, _State>& __cvt) ++ { ++ _State __state = {}; ++ size_t __n; ++ return __str_codecvt_in(__first, __last, __outstr, __cvt, __state, __n); ++ } ++ ++ // Convert wide character string to narrow. ++ template<typename _CharT, typename _Traits, typename _Alloc, typename _State> ++ inline bool ++ __str_codecvt_out(const _CharT* __first, const _CharT* __last, ++ basic_string<char, _Traits, _Alloc>& __outstr, ++ const codecvt<_CharT, char, _State>& __cvt, ++ _State& __state, size_t& __count) ++ { ++ using _Codecvt = codecvt<_CharT, char, _State>; ++ using _ConvFn ++ = codecvt_base::result ++ (_Codecvt::*)(_State&, const _CharT*, const _CharT*, const _CharT*&, ++ char*, char*, char*&) const; ++ _ConvFn __fn = &codecvt<_CharT, char, _State>::out; ++ return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, ++ __count, __fn); ++ } ++ ++ template<typename _CharT, typename _Traits, typename _Alloc, typename _State> ++ inline bool ++ __str_codecvt_out(const _CharT* __first, const _CharT* __last, ++ basic_string<char, _Traits, _Alloc>& __outstr, ++ const codecvt<_CharT, char, _State>& __cvt) ++ { ++ _State __state = {}; ++ size_t __n; ++ return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); ++ } ++ + _GLIBCXX_BEGIN_NAMESPACE_CXX11 ++ + /// String conversions + template<typename _Codecvt, typename _Elem = wchar_t, + typename _Wide_alloc = allocator<_Elem>, +@@ -137,9 +244,15 @@ + wide_string + from_bytes(const char* __first, const char* __last) + { +- auto __errstr = _M_with_strings ? &_M_wide_err_string : nullptr; +- _ConvFn<char, _Elem> __fn = &_Codecvt::in; +- return _M_conv(__first, __last, __errstr, __fn); ++ if (!_M_with_cvtstate) ++ _M_state = state_type(); ++ wide_string __out{ _M_wide_err_string.get_allocator() }; ++ if (__str_codecvt_in(__first, __last, __out, *_M_cvt, _M_state, ++ _M_count)) ++ return __out; ++ if (_M_with_strings) ++ return _M_wide_err_string; ++ __throw_range_error("wstring_convert::from_bytes"); + } + /// @} + +@@ -167,9 +280,15 @@ + byte_string + to_bytes(const _Elem* __first, const _Elem* __last) + { +- auto __errstr = _M_with_strings ? &_M_byte_err_string : nullptr; +- _ConvFn<_Elem, char> __fn = &_Codecvt::out; +- return _M_conv(__first, __last, __errstr, __fn); ++ if (!_M_with_cvtstate) ++ _M_state = state_type(); ++ byte_string __out{ _M_byte_err_string.get_allocator() }; ++ if (__str_codecvt_out(__first, __last, __out, *_M_cvt, _M_state, ++ _M_count)) ++ return __out; ++ if (_M_with_strings) ++ return _M_byte_err_string; ++ __throw_range_error("wstring_convert::to_bytes"); + } + /// @} + +@@ -182,63 +301,6 @@ + state_type state() const { return _M_state; } + + private: +- template<typename _InC, typename _OutC> +- using _ConvFn +- = codecvt_base::result +- (_Codecvt::*)(state_type&, const _InC*, const _InC*, const _InC*&, +- _OutC*, _OutC*, _OutC*&) const; +- +- template<typename _InChar, typename _OutStr, typename _MemFn> +- _OutStr +- _M_conv(const _InChar* __first, const _InChar* __last, +- const _OutStr* __err, _MemFn __memfn) +- { +- auto __outstr = __err ? _OutStr(__err->get_allocator()) : _OutStr(); +- +- if (__first == __last) +- { +- _M_count = 0; +- return __outstr; +- } +- +- if (!_M_with_cvtstate) +- _M_state = state_type(); +- +- size_t __outchars = 0; +- auto __next = __first; +- const auto __maxlen = _M_cvt->max_length() + 1; +- +- codecvt_base::result __result; +- do +- { +- __outstr.resize(__outstr.size() + (__last - __next) * __maxlen); +- auto __outnext = &__outstr.front() + __outchars; +- auto const __outlast = &__outstr.back() + 1; +- __result = ((*_M_cvt).*__memfn)(_M_state, __next, __last, __next, +- __outnext, __outlast, __outnext); +- __outchars = __outnext - &__outstr.front(); +- } +- while (__result == codecvt_base::partial && __next != __last +- && (__outstr.size() - __outchars) < __maxlen); +- +- if (__result == codecvt_base::noconv) +- { +- __outstr.assign(__first, __last); +- _M_count = __outstr.size(); +- return __outstr; +- } +- +- __outstr.resize(__outchars); +- _M_count = __next - __first; +- +- if (__result != codecvt_base::error) +- return __outstr; +- else if (__err) +- return *__err; +- else +- __throw_range_error("wstring_convert"); +- } +- + unique_ptr<_Codecvt> _M_cvt; + byte_string _M_byte_err_string; + wide_string _M_wide_err_string; +@@ -247,6 +309,7 @@ + bool _M_with_cvtstate = false; + bool _M_with_strings = false; + }; ++ + _GLIBCXX_END_NAMESPACE_CXX11 + + /// Buffer conversions +Index: libstdc++-v3/include/bits/quoted_string.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/quoted_string.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/bits/quoted_string.h (.../branches/gcc-5-branch) +@@ -0,0 +1,164 @@ ++// Helpers for quoted stream manipulators -*- C++ -*- ++ ++// Copyright (C) 2013-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. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// <http://www.gnu.org/licenses/>. ++ ++/** @file bits/quoted_string.h ++ * This is an internal header file, included by other library headers. ++ * Do not attempt to use it directly. @headername{iomanip} ++ */ ++ ++#ifndef _GLIBCXX_QUOTED_STRING_H ++#define _GLIBCXX_QUOTED_STRING_H 1 ++ ++#pragma GCC system_header ++ ++#if __cplusplus < 201103L ++# include <bits/c++0x_warning.h> ++#else ++#include <sstream> ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++ namespace __detail { ++ _GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++ /** ++ * @brief Struct for delimited strings. ++ */ ++ template<typename _String, typename _CharT> ++ struct _Quoted_string ++ { ++ static_assert(is_reference<_String>::value ++ || is_pointer<_String>::value, ++ "String type must be pointer or reference"); ++ ++ _Quoted_string(_String __str, _CharT __del, _CharT __esc) ++ : _M_string(__str), _M_delim{__del}, _M_escape{__esc} ++ { } ++ ++ _Quoted_string& ++ operator=(_Quoted_string&) = delete; ++ ++ _String _M_string; ++ _CharT _M_delim; ++ _CharT _M_escape; ++ }; ++ ++ /** ++ * @brief Inserter for quoted strings. ++ * ++ * _GLIBCXX_RESOLVE_LIB_DEFECTS ++ * DR 2344 quoted()'s interaction with padding is unclear ++ */ ++ template<typename _CharT, typename _Traits> ++ std::basic_ostream<_CharT, _Traits>& ++ operator<<(std::basic_ostream<_CharT, _Traits>& __os, ++ const _Quoted_string<const _CharT*, _CharT>& __str) ++ { ++ std::basic_ostringstream<_CharT, _Traits> __ostr; ++ __ostr << __str._M_delim; ++ for (const _CharT* __c = __str._M_string; *__c; ++__c) ++ { ++ if (*__c == __str._M_delim || *__c == __str._M_escape) ++ __ostr << __str._M_escape; ++ __ostr << *__c; ++ } ++ __ostr << __str._M_delim; ++ ++ return __os << __ostr.str(); ++ } ++ ++ /** ++ * @brief Inserter for quoted strings. ++ * ++ * _GLIBCXX_RESOLVE_LIB_DEFECTS ++ * DR 2344 quoted()'s interaction with padding is unclear ++ */ ++ template<typename _CharT, typename _Traits, typename _String> ++ std::basic_ostream<_CharT, _Traits>& ++ operator<<(std::basic_ostream<_CharT, _Traits>& __os, ++ const _Quoted_string<_String, _CharT>& __str) ++ { ++ std::basic_ostringstream<_CharT, _Traits> __ostr; ++ __ostr << __str._M_delim; ++ for (auto& __c : __str._M_string) ++ { ++ if (__c == __str._M_delim || __c == __str._M_escape) ++ __ostr << __str._M_escape; ++ __ostr << __c; ++ } ++ __ostr << __str._M_delim; ++ ++ return __os << __ostr.str(); ++ } ++ ++ /** ++ * @brief Extractor for delimited strings. ++ * The left and right delimiters can be different. ++ */ ++ template<typename _CharT, typename _Traits, typename _Alloc> ++ std::basic_istream<_CharT, _Traits>& ++ operator>>(std::basic_istream<_CharT, _Traits>& __is, ++ const _Quoted_string<basic_string<_CharT, _Traits, _Alloc>&, ++ _CharT>& __str) ++ { ++ _CharT __c; ++ __is >> __c; ++ if (!__is.good()) ++ return __is; ++ if (__c != __str._M_delim) ++ { ++ __is.unget(); ++ __is >> __str._M_string; ++ return __is; ++ } ++ __str._M_string.clear(); ++ std::ios_base::fmtflags __flags ++ = __is.flags(__is.flags() & ~std::ios_base::skipws); ++ do ++ { ++ __is >> __c; ++ if (!__is.good()) ++ break; ++ if (__c == __str._M_escape) ++ { ++ __is >> __c; ++ if (!__is.good()) ++ break; ++ } ++ else if (__c == __str._M_delim) ++ break; ++ __str._M_string += __c; ++ } ++ while (true); ++ __is.setf(__flags); ++ ++ return __is; ++ } ++ ++ _GLIBCXX_END_NAMESPACE_VERSION ++ } // namespace __detail ++} // namespace std ++ ++#endif // C++11 ++#endif /* _GLIBCXX_QUOTED_STRING_H */ Index: libstdc++-v3/include/bits/regex_compiler.tcc =================================================================== --- a/src/libstdc++-v3/include/bits/regex_compiler.tcc (.../tags/gcc_5_2_0_release) @@ -125,11 +7356,281 @@ Index: libstdc++-v3/include/bits/regex_compiler.tcc } template<typename _TraitsT> +Index: libstdc++-v3/include/Makefile.am +=================================================================== +--- a/src/libstdc++-v3/include/Makefile.am (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/include/Makefile.am (.../branches/gcc-5-branch) +@@ -128,6 +128,7 @@ + ${bits_srcdir}/postypes.h \ + ${bits_srcdir}/predefined_ops.h \ + ${bits_srcdir}/ptr_traits.h \ ++ ${bits_srcdir}/quoted_string.h \ + ${bits_srcdir}/random.h \ + ${bits_srcdir}/random.tcc \ + ${bits_srcdir}/range_access.h \ +@@ -650,11 +651,23 @@ + ${experimental_srcdir}/optional \ + ${experimental_srcdir}/ratio \ + ${experimental_srcdir}/string_view \ ++ ${experimental_srcdir}/string_view.tcc \ + ${experimental_srcdir}/system_error \ +- ${experimental_srcdir}/string_view.tcc \ + ${experimental_srcdir}/tuple \ +- ${experimental_srcdir}/type_traits ++ ${experimental_srcdir}/type_traits \ ++ ${experimental_filesystem_headers} + ++if ENABLE_FILESYSTEM_TS ++experimental_filesystem_headers = \ ++ ${experimental_srcdir}/filesystem \ ++ ${experimental_srcdir}/fs_dir.h \ ++ ${experimental_srcdir}/fs_fwd.h \ ++ ${experimental_srcdir}/fs_ops.h \ ++ ${experimental_srcdir}/fs_path.h ++else ++experimental_filesystem_headers = ++endif ++ + # This is the common subset of C++ files that all three "C" header models use. + c_base_srcdir = $(C_INCLUDE_DIR) + c_base_builddir = . +Index: libstdc++-v3/libsupc++/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/libsupc++/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/libsupc++/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -17,6 +17,23 @@ + + + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -87,6 +104,12 @@ + am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ++am__uninstall_files_from_dir = { \ ++ test -z "$$files" \ ++ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ ++ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ ++ $(am__cd) "$$dir" && rm -f $$files; }; \ ++ } + am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(bitsdir)" \ + "$(DESTDIR)$(stddir)" + LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) +@@ -129,6 +152,11 @@ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + CXXLD = $(CXX) + SOURCES = $(libsupc___la_SOURCES) $(libsupc__convenience_la_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + HEADERS = $(bits_HEADERS) $(std_HEADERS) + ETAGS = etags + CTAGS = ctags +@@ -544,6 +572,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -564,7 +593,6 @@ + done + install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" + @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ +@@ -572,6 +600,8 @@ + else :; fi; \ + done; \ + test -z "$$list2" || { \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ + } +@@ -593,9 +623,9 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libsupc++.la: $(libsupc___la_OBJECTS) $(libsupc___la_DEPENDENCIES) ++libsupc++.la: $(libsupc___la_OBJECTS) $(libsupc___la_DEPENDENCIES) $(EXTRA_libsupc___la_DEPENDENCIES) + $(CXXLINK) -rpath $(toolexeclibdir) $(libsupc___la_OBJECTS) $(libsupc___la_LIBADD) $(LIBS) +-libsupc++convenience.la: $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_DEPENDENCIES) ++libsupc++convenience.la: $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_DEPENDENCIES) $(EXTRA_libsupc__convenience_la_DEPENDENCIES) + $(CXXLINK) $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_LIBADD) $(LIBS) + + mostlyclean-compile: +@@ -696,10 +726,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: Index: libstdc++-v3/ChangeLog =================================================================== --- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,17 @@ +@@ -1,3 +1,126 @@ ++2015-08-18 Jonathan Wakely <jwakely@redhat.com> ++ ++ Backport Filesystem TS from mainline ++ * acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS, ++ GLIBCXX_CHECK_FILESYSTEM_DEPS): Define. ++ * configure.ac: Use them. ++ * configure: Regenerate. ++ * config.h.in: Regenerate. ++ * include/Makefile.am: Add filesystem headers. Fix order of headers. ++ * include/Makefile.in: Regenerate. ++ * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in, ++ __str_codecvt_out, wstring_convert): Refactor to move all conversion ++ logic to non-member functions. ++ * include/bits/quoted_string.h (_Quoted_string, operator<<, ++ operator>>): Move from <iomanip> to new header. ++ * include/experimental/filesystem: New. ++ * include/experimental/fs_dir.h: New. ++ * include/experimental/fs_fwd.h: New. ++ * include/experimental/fs_ops.h: New. ++ * include/experimental/fs_path.h: New. ++ * include/std/iomanip (_Quoted_string, operator<<, operator>>): Move ++ to <bits/quoted_string.h>. ++ * libstdcxx/v6/printers.py (StdExpPathPrinter): Define. ++ * scripts/testsuite_flags.in: Add filesystem dir to ldflags. ++ * src/Makefile.am: Add filesystem sub-dir. ++ * src/Makefile.in: Regenerate. ++ * src/filesystem/Makefile.am: New. ++ * src/filesystem/Makefile.in: New. ++ * src/filesystem/dir.cc: New. ++ * src/filesystem/ops.cc: New. ++ * src/filesystem/path.cc: New. ++ * testsuite/experimental/filesystem/operations/absolute.cc: New. ++ * testsuite/experimental/filesystem/operations/copy.cc: New. ++ * testsuite/experimental/filesystem/operations/current_path.cc: New. ++ * testsuite/experimental/filesystem/operations/exists.cc: New. ++ * testsuite/experimental/filesystem/operations/file_size.cc: New. ++ * testsuite/experimental/filesystem/operations/status.cc: New. ++ * testsuite/experimental/filesystem/operations/temp_directory_path.cc: ++ New. ++ * testsuite/experimental/filesystem/path/append/path.cc: New. ++ * testsuite/experimental/filesystem/path/assign/assign.cc: New. ++ * testsuite/experimental/filesystem/path/assign/copy.cc: New. ++ * testsuite/experimental/filesystem/path/compare/compare.cc: New. ++ * testsuite/experimental/filesystem/path/compare/path.cc: New. ++ * testsuite/experimental/filesystem/path/compare/strings.cc: New. ++ * testsuite/experimental/filesystem/path/concat/path.cc: New. ++ * testsuite/experimental/filesystem/path/concat/strings.cc: New. ++ * testsuite/experimental/filesystem/path/construct/copy.cc: New. ++ * testsuite/experimental/filesystem/path/construct/default.cc: New. ++ * testsuite/experimental/filesystem/path/construct/locale.cc: New. ++ * testsuite/experimental/filesystem/path/construct/range.cc: New. ++ * testsuite/experimental/filesystem/path/decompose/extension.cc: New. ++ * testsuite/experimental/filesystem/path/decompose/filename.cc: New. ++ * testsuite/experimental/filesystem/path/decompose/parent_path.cc: ++ New. ++ * testsuite/experimental/filesystem/path/decompose/relative_path.cc: ++ New. ++ * testsuite/experimental/filesystem/path/decompose/root_directory.cc: ++ New. ++ * testsuite/experimental/filesystem/path/decompose/root_name.cc: New. ++ * testsuite/experimental/filesystem/path/decompose/root_path.cc: New. ++ * testsuite/experimental/filesystem/path/decompose/stem.cc: New. ++ * testsuite/experimental/filesystem/path/generic/generic_string.cc: ++ New. ++ * testsuite/experimental/filesystem/path/itr/traversal.cc: New. ++ * testsuite/experimental/filesystem/path/modifiers/clear.cc: New. ++ * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc: ++ New. ++ * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc: ++ New. ++ * testsuite/experimental/filesystem/path/modifiers/ ++ replace_extension.cc: New. ++ * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc: ++ New. ++ * testsuite/experimental/filesystem/path/modifiers/swap.cc: New. ++ * testsuite/experimental/filesystem/path/nonmember/hash_value.cc: ++ New. ++ * testsuite/experimental/filesystem/path/query/empty.cc: New. ++ * testsuite/experimental/filesystem/path/query/has_extension.cc: New. ++ * testsuite/experimental/filesystem/path/query/has_filename.cc: New. ++ * testsuite/experimental/filesystem/path/query/has_parent_path.cc: ++ New. ++ * testsuite/experimental/filesystem/path/query/has_relative_path.cc: ++ New. ++ * testsuite/experimental/filesystem/path/query/has_root_directory.cc: ++ New. ++ * testsuite/experimental/filesystem/path/query/has_root_name.cc: New. ++ * testsuite/experimental/filesystem/path/query/has_root_path.cc: New. ++ * testsuite/experimental/filesystem/path/query/has_stem.cc: New. ++ * testsuite/experimental/filesystem/path/query/is_relative.cc: New. ++ * testsuite/lib/dg-options.exp (dg-require-filesystem-ts): Define. ++ * testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Define. ++ * testsuite/util/testsuite_fs.h: New. ++ ++2015-08-18 Jonathan Wakely <jwakely@redhat.com> ++ ++ * Makefile.in: Regenerate with automake-1.11.6. ++ * aclocal.m4: Likewise. ++ * configure: Likewise. ++ * doc/Makefile.in: Likewise. ++ * include/Makefile.in: Likewise. ++ * libsupc++/Makefile.in: Likewise. ++ * po/Makefile.in: Likewise. ++ * python/Makefile.in: Likewise. ++ * src/Makefile.in: Likewise. ++ * src/c++11/Makefile.in: Likewise. ++ * src/c++98/Makefile.in: Likewise. ++ * testsuite/Makefile.in: Likewise. ++ +2015-07-29 Tim Shen <timshen@google.com> + + Backport from mainline @@ -147,6 +7648,87 @@ Index: libstdc++-v3/ChangeLog 2015-07-16 Release Manager * GCC 5.2.0 released. +Index: libstdc++-v3/testsuite/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/testsuite/Makefile.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/Makefile.in (.../branches/gcc-5-branch) +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.11.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software ++# Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,6 +15,23 @@ + + @SET_MAKE@ + VPATH = @srcdir@ ++am__make_dryrun = \ ++ { \ ++ am__dry=no; \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ ++ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ ++ *) \ ++ for am__flg in $$MAKEFLAGS; do \ ++ case $$am__flg in \ ++ *=*|--*) ;; \ ++ *n*) am__dry=yes; break;; \ ++ esac; \ ++ done;; \ ++ esac; \ ++ test $$am__dry = yes; \ ++ } + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -67,6 +84,11 @@ + depcomp = + am__depfiles_maybe = + SOURCES = ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac + ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ + ACLOCAL = @ACLOCAL@ + ALLOCATOR_H = @ALLOCATOR_H@ +@@ -370,6 +392,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; ++$(top_srcdir)/fragment.am: + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +@@ -405,10 +428,15 @@ + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: Index: libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc =================================================================== --- a/src/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc (.../tags/gcc_5_2_0_release) @@ -228,6 +7810,3414 @@ Index: libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01 + return 0; } +Index: libstdc++-v3/testsuite/lib/libstdc++.exp +=================================================================== +--- a/src/libstdc++-v3/testsuite/lib/libstdc++.exp (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/lib/libstdc++.exp (.../branches/gcc-5-branch) +@@ -1894,6 +1894,59 @@ + return $et_little_endian + } + ++proc check_v3_target_filesystem_ts { } { ++ global cxxflags ++ global DEFAULT_CXXFLAGS ++ global et_filesystem_ts ++ global tool ++ ++ if { ![info exists et_filesystem_ts_target_name] } { ++ set et_filesystem_ts_target_name "" ++ } ++ ++ # If the target has changed since we set the cached value, clear it. ++ set current_target [current_target_name] ++ if { $current_target != $et_filesystem_ts_target_name } { ++ verbose "check_v3_target_filesystem_ts: `$et_filesystem_ts_target_name'" 2 ++ set et_filesystem_ts_target_name $current_target ++ if [info exists et_filesystem_ts] { ++ verbose "check_v3_target_filesystem_ts: removing cached result" 2 ++ unset et_filesystem_ts ++ } ++ } ++ ++ if [info exists et_filesystem_ts] { ++ verbose "check_v3_target_filesystem_ts: using cached result" 2 ++ } else { ++ set et_filesystem_ts 0 ++ ++ # Set up and preprocess a C++ test program that depends ++ # on debug mode activated. ++ set src filesystem_ts[pid].cc ++ ++ set f [open $src "w"] ++ puts $f "#include <experimental/filesystem>" ++ puts $f "#if ! __cpp_lib_experimental_filesystem" ++ puts $f "# error No Filesystem TS support" ++ puts $f "#endif" ++ close $f ++ ++ set cxxflags_saved $cxxflags ++ set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror -std=gnu++11" ++ ++ set lines [v3_target_compile $src /dev/null preprocess ""] ++ set cxxflags $cxxflags_saved ++ file delete $src ++ ++ if [string match "" $lines] { ++ # No error message, preprocessing succeeded. ++ set et_filesystem_ts 1 ++ } ++ } ++ verbose "check_v3_target_filesystem_ts: $et_filesystem_ts" 2 ++ return $et_filesystem_ts ++} ++ + set additional_prunes "" + + if { [info exists env(GCC_RUNTEST_PARALLELIZE_DIR)] \ +Index: libstdc++-v3/testsuite/lib/dg-options.exp +=================================================================== +--- a/src/libstdc++-v3/testsuite/lib/dg-options.exp (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/lib/dg-options.exp (.../branches/gcc-5-branch) +@@ -223,6 +223,15 @@ + return + } + ++proc dg-require-filesystem-ts { args } { ++ if { ![ check_v3_target_filesystem_ts ] } { ++ upvar dg-do-what dg-do-what ++ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] ++ return ++ } ++ return ++} ++ + proc add_options_for_no_pch { flags } { + # This forces any generated and possibly included PCH to be invalid. + return "-D__GLIBCXX__=99999999" +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,55 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 15.1 Absolute [fs.op.absolute] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ VERIFY( absolute(p).is_absolute() ); ++} ++ ++void ++test02() ++{ ++ path p1("/"); ++ VERIFY( absolute(p1) == p1 ); ++ VERIFY( absolute(p1, "/bar") == p1 ); ++ path p2("/foo"); ++ VERIFY( absolute(p2) == p2 ); ++ VERIFY( absolute(p2, "/bar") == p2 ); ++ path p3("foo"); ++ VERIFY( absolute(p3) != p3 ); ++ VERIFY( absolute(p3, "/bar") == "/bar/foo" ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,57 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 15.11 Current path [fs.op.current_path] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++namespace fs = std::experimental::filesystem; ++ ++void ++test01() ++{ ++ fs::path dot("."); ++ fs::path cwd = fs::current_path(); ++ std::error_code ec; ++ fs::path cwd2 = fs::current_path(ec); ++ VERIFY( cwd == cwd2 ); ++} ++ ++void ++test02() ++{ ++ auto oldwd = fs::current_path(); ++ auto tmpdir = fs::temp_directory_path(); ++ current_path(tmpdir); ++ VERIFY( canonical(fs::current_path()) == canonical(tmpdir) ); ++ std::error_code ec; ++ current_path(oldwd, ec); ++ VERIFY( canonical(fs::current_path()) == canonical(oldwd) ); ++ VERIFY( canonical(fs::current_path(ec)) == canonical(oldwd) ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,58 @@ ++// 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 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( exists(path{"/"}) ); ++ VERIFY( exists(path{"/."}) ); ++ VERIFY( exists(path{"."}) ); ++} ++ ++void ++test02() ++{ ++ path rel{"xXxXx"}; ++ while (exists(rel)) ++ rel /= "x"; ++ VERIFY( !exists(rel) ); ++} ++ ++void ++test03() ++{ ++ path abs{"/xXxXx"}; ++ while (exists(abs)) ++ abs /= "x"; ++ VERIFY( !exists(abs) ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++ test03(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,58 @@ ++// 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 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++namespace fs = std::experimental::filesystem; ++ ++void ++test01() ++{ ++ std::error_code ec; ++ fs::file_status st1 = fs::status(".", ec); ++ VERIFY( !ec ); ++ VERIFY( st1.type() == fs::file_type::directory ); ++ ++ fs::file_status st2 = fs::status("."); ++ VERIFY( st2.type() == fs::file_type::directory ); ++} ++ ++void ++test02() ++{ ++ fs::path p = __gnu_test::nonexistent_path(); ++ ++ std::error_code ec; ++ fs::file_status st1 = fs::status(p, ec); ++ VERIFY( ec ); ++ VERIFY( st1.type() == fs::file_type::not_found ); ++ ++ fs::file_status st2 = fs::status(p); ++ VERIFY( st2.type() == fs::file_type::not_found ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,80 @@ ++// 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 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++#include <experimental/filesystem> ++#include <stdlib.h> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++void ++clean_env() ++{ ++ ::unsetenv("TMPDIR"); ++ ::unsetenv("TMP"); ++ ::unsetenv("TEMPDIR"); ++ ::unsetenv("TEMP"); ++} ++ ++namespace fs = std::experimental::filesystem; ++ ++void ++test01() ++{ ++ clean_env(); ++ ++ if (!fs::exists("/tmp")) ++ return; // just give up ++ ++ std::error_code ec; ++ fs::path p1 = fs::temp_directory_path(ec); ++ VERIFY( exists(p1) ); ++ ++ fs::path p2 = fs::temp_directory_path(); ++ VERIFY( p1 == p2 ); ++} ++ ++void ++test02() ++{ ++ clean_env(); ++ ++ if (::setenv("TMPDIR", __gnu_test::nonexistent_path().string().c_str(), 1)) ++ return; // just give up ++ ++ std::error_code ec; ++ fs::path p = fs::temp_directory_path(ec); ++ VERIFY( ec ); ++ ++ std::error_code ec2; ++ try { ++ p = fs::temp_directory_path(); ++ } catch (const fs::filesystem_error& e) { ++ ec2 = e.code(); ++ } ++ VERIFY( ec2 == ec ); ++} ++ ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,70 @@ ++// 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 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++namespace fs = std::experimental::filesystem; ++ ++void ++test01() ++{ ++ std::error_code ec; ++ size_t size = fs::file_size(".", ec); ++ VERIFY( ec == std::errc::is_a_directory ); ++ VERIFY( size == -1 ); ++ ++ try { ++ size = fs::file_size("."); ++ ec.clear(); ++ } catch (const fs::filesystem_error& e) { ++ ec = e.code(); ++ } ++ VERIFY( ec == std::errc::is_a_directory ); ++ VERIFY( size == -1 ); ++} ++ ++void ++test02() ++{ ++ fs::path p = __gnu_test::nonexistent_path(); ++ ++ std::error_code ec; ++ size_t size = fs::file_size(p, ec); ++ VERIFY( ec ); ++ VERIFY( size == -1 ); ++ ++ try { ++ size = fs::file_size(p); ++ ec.clear(); ++ } catch (const fs::filesystem_error& e) { ++ ec = e.code(); ++ } ++ VERIFY( ec ); ++ VERIFY( size == -1 ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,55 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 15.3 Copy [fs.op.copy] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ VERIFY( absolute(p).is_absolute() ); ++} ++ ++void ++test02() ++{ ++ path p1("/"); ++ VERIFY( absolute(p1) == p1 ); ++ VERIFY( absolute(p1, "/bar") == p1 ); ++ path p2("/foo"); ++ VERIFY( absolute(p2) == p2 ); ++ VERIFY( absolute(p2, "/bar") == p2 ); ++ path p3("foo"); ++ VERIFY( absolute(p3) != p3 ); ++ VERIFY( absolute(p3, "/bar") == "/bar/foo" ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,63 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++template<typename T, T sep> ++struct checker ++{ ++ static void check(const char* s) { } ++}; ++ ++template<> ++struct checker<char, '/'> ++{ ++ static void check() ++ { ++ VERIFY( path("foo/bar").make_preferred() == "foo/bar" ); ++ } ++}; ++ ++template<> ++struct checker<wchar_t, L'\\'> ++{ ++ static void check() ++ { ++ VERIFY( path("foo/bar").make_preferred() == L"foo\\bar" ); ++ } ++}; ++ ++void ++test01() ++{ ++ checker<path::value_type, path::preferred_separator>::check(); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,52 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo").replace_filename("bar") == "/bar" ); ++ VERIFY( path("/").replace_filename("bar") == "bar" ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path p2(p); ++ p2.replace_filename(p.filename()); ++ VERIFY( p2 == p ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,53 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo").remove_filename() == "/" ); ++ VERIFY( path("/").remove_filename() == "" ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path p2(p); ++ p2.remove_filename(); ++ p2 /= p.filename(); ++ VERIFY( p2 == p ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,45 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (path p : __gnu_test::test_paths) ++ { ++ path empty; ++ p.clear(); ++ VERIFY( p.empty() ); ++ __gnu_test::compare_paths(p, empty); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,52 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo.txt").replace_extension("cpp") == "/foo.cpp" ); ++ VERIFY( path("/foo.txt").replace_extension(".cpp") == "/foo.cpp" ); ++ VERIFY( path("/").replace_extension("bar") == "/.bar" ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path p2 = p; ++ VERIFY(p2.replace_extension(p2.extension()) == p); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,44 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.5 path modifiers [path.modifiers] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ const path p("/foo/bar"); ++ path p1; ++ path p2 = p; ++ p1.swap(p2); ++ VERIFY( p2.empty() ); ++ __gnu_test::compare_paths(p1, p); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,51 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.6 path non-member functions [path.non-member] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( hash_value(path("a//b")) == hash_value(path("a/b")) ); ++ VERIFY( hash_value(path("a/")) == hash_value(path("a/.")) ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path pp = p.native(); ++ VERIFY( hash_value(p) == hash_value(pp) ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,89 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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 <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++using __gnu_test::compare_paths; ++ ++void ++test01() ++{ ++ for (std::string s : __gnu_test::test_paths) ++ { ++ path p0 = s, p1, p2, p3, p4; ++ ++ p1 = s; ++ compare_paths(p0, p1); ++ ++ p2 = s.c_str(); ++ compare_paths(p0, p2); ++ ++ std::wstring ws(s.begin(), s.end()); ++ ++ p3 = ws; ++ compare_paths(p0, p3); ++ ++ p4 = ws.c_str(); ++ compare_paths(p0, p4); ++ } ++} ++ ++void ++test02() ++{ ++ for (std::string s : __gnu_test::test_paths) ++ { ++ path p0 = s, p1, p2, p3, p4, p5, p6, p7, p8; ++ ++ p1.assign(s); ++ compare_paths(p0, p1); ++ ++ p2.assign( s.begin(), s.end() ); ++ compare_paths(p0, p2); ++ ++ p3.assign( s.c_str() ); ++ compare_paths(p0, p3); ++ ++ p4.assign( s.c_str(), s.c_str() + s.size() ); ++ compare_paths(p0, p4); ++ ++ std::wstring ws(s.begin(), s.end()); ++ ++ p5.assign(ws); ++ compare_paths(p0, p5); ++ ++ p6.assign( ws.begin(), ws.end() ); ++ compare_paths(p0, p6); ++ ++ p7.assign( ws.c_str() ); ++ compare_paths(p0, p7); ++ ++ p8.assign( ws.c_str(), ws.c_str() + ws.size() ); ++ compare_paths(p0, p8); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,55 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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 <experimental/filesystem> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++using __gnu_test::compare_paths; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path copy; ++ copy = p; ++ __gnu_test::compare_paths(p, copy); ++ } ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path copy = p; ++ path move; ++ move = std::move(copy); ++ __gnu_test::compare_paths(p, move); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,60 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.1 path constructors [path.construct] ++ ++#include <experimental/filesystem> ++#include <string> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++using __gnu_test::compare_paths; ++ ++void ++test01() ++{ ++ for (std::string s : __gnu_test::test_paths) ++ { ++ path p1 = s; ++ path p2( s.begin(), s.end() ); ++ path p3( s.c_str() ); ++ path p4( s.c_str(), s.c_str() + s.size() ); ++ ++ std::wstring ws(s.begin(), s.end()); ++ path p5 = ws; ++ path p6( ws.begin(), ws.end() ); ++ path p7( ws.c_str() ); ++ path p8( ws.c_str(), ws.c_str() + ws.size() ); ++ ++ compare_paths(p1, p2); ++ compare_paths(p1, p3); ++ compare_paths(p1, p4); ++ compare_paths(p1, p5); ++ compare_paths(p1, p6); ++ compare_paths(p1, p7); ++ compare_paths(p1, p8); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,39 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.1 path constructors [path.construct] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p("/foo/bar", std::locale::classic()); ++ VERIFY( p.string() == "/foo/bar" ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,50 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.1 path constructors [path.construct] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p; ++ VERIFY( p.empty() ); ++ VERIFY( !p.has_root_path() ); ++ VERIFY( !p.has_root_name() ); ++ VERIFY( !p.has_root_directory() ); ++ VERIFY( !p.has_relative_path() ); ++ VERIFY( !p.has_parent_path() ); ++ VERIFY( !p.has_filename() ); ++ VERIFY( !p.has_stem() ); ++ VERIFY( !p.has_extension() ); ++ VERIFY( !p.is_absolute() ); ++ VERIFY( p.is_relative() ); ++ VERIFY( std::distance(p.begin(), p.end()) == 0 ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,54 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.1 path constructors [path.construct] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path copy = p; ++ __gnu_test::compare_paths(p, copy); ++ } ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path copy = p; ++ path move = std::move(copy); ++ __gnu_test::compare_paths(p, move); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_filename() == !p.filename().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const std::string& s : __gnu_test::test_paths) ++ { ++ VERIFY( s.empty() == path(s).empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_root_name() == !p.root_name().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_parent_path() == !p.parent_path().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_relative_path() == !p.relative_path().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_root_directory() == !p.root_directory().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_stem() == !p.stem().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.is_relative() == !p.is_absolute() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_extension() == !p.extension().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,43 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.has_root_path() == !p.root_path().empty() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,50 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.8 path compare [path.compare] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ const path p0 = "/a/a/b/b"; ++ for (const path& p : __gnu_test::test_paths) ++ { ++ VERIFY( p.compare(p) == 0 ); ++ int cmp = p.compare(p0); ++ if (cmp == 0) ++ VERIFY( p0.compare(p) == 0 ); ++ else if (cmp < 0) ++ VERIFY( p0.compare(p) > 0 ); ++ else if (cmp > 0) ++ VERIFY( p0.compare(p) < 0 ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,50 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.8 path compare [path.compare] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p("/foo/bar"); ++ VERIFY( p.compare(p) == 0 ); ++ VERIFY( p.compare("/foo//bar") == 0 ); ++ ++ path q("/foo/baz"); ++ VERIFY( p.compare(q) < 0 ); ++ VERIFY( q.compare(p) > 0 ); ++ ++ path r("/foo/bar/."); ++ VERIFY( p.compare(r) < 0 ); ++ ++ VERIFY( path("a/b/").compare("a/b/.") == 0 ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,48 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.8 path compare [path.compare] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ const std::string s0 = "/a/a/b/b"; ++ const path p0 = s0; ++ for (const std::string& s : __gnu_test::test_paths) ++ { ++ path p(s); ++ VERIFY( p.compare(s) == 0 ); ++ VERIFY( p.compare(s.c_str()) == 0 ); ++ VERIFY( p.compare(p0) == p.compare(s0) ); ++ VERIFY( p.compare(p0) == p.compare(s0.c_str()) ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/native/TODO +=================================================================== +Index: libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,63 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.3 path appends [path.append] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ const path p("/foo/bar"); ++ ++ path pp = p; ++ pp /= p; ++ VERIFY( pp.native() == "/foo/bar/foo/bar" ); ++ ++ path q("baz"); ++ ++ path qq = q; ++ qq /= q; ++ VERIFY( qq.native() == "baz/baz" ); ++ ++ q /= p; ++ VERIFY( q.native() == "baz/foo/bar" ); ++ ++ path r = ""; ++ r /= path(); ++ VERIFY( r.empty() ); ++ ++ r /= path("rel"); ++ VERIFY( !r.is_absolute() ); ++ ++ path s = "dir/"; ++ s /= path("/file"); ++ VERIFY( s.native() == "dir//file" ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,68 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.4 path concatenation [path.concat] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ const path p("/foo/bar"); ++ ++ path pp = p; ++ pp += p; ++ VERIFY( pp.native() == "/foo/bar/foo/bar" ); ++ VERIFY( std::distance(pp.begin(), pp.end()) == 5 ); ++ ++ path q("foo/bar"); ++ ++ path qq = q; ++ qq += q; ++ VERIFY( qq.native() == "foo/barfoo/bar" ); ++ VERIFY( std::distance(qq.begin(), qq.end()) == 3 ); ++ ++ q += p; ++ VERIFY( q.native() == "foo/bar/foo/bar" ); ++ VERIFY( std::distance(q.begin(), q.end()) == 4 ); ++} ++ ++void ++test02() ++{ ++ for (path p : __gnu_test::test_paths) ++ { ++ auto prior_native = p.native(); ++ path x("//blah/di/blah"); ++ p += x; ++ VERIFY( p.native() == prior_native + x.native() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,51 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.4 path concatenation [path.concat] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p("/"); ++ p += path::string_type("foo"); ++ VERIFY( p.filename() == "foo" ); ++ p += "bar"; ++ VERIFY( p.filename() == "foobar" ); ++ p += '/'; ++ VERIFY( p.parent_path() == "/foobar" && p.filename() == "." ); ++ p += L"baz.txt"; ++ VERIFY( p.filename() == "baz.txt" ); ++ p.concat("/dir/"); ++ VERIFY( p.parent_path() == "/foobar/baz.txt/dir" && p.filename() == "." ); ++ std::string file = "file"; ++ p.concat(file.begin(), file.end()); ++ VERIFY( p.filename() == "file" ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/factory/TODO +=================================================================== +Index: libstdc++-v3/testsuite/experimental/filesystem/path/io/TODO +=================================================================== +Index: libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,48 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.7 path generic format observers [path.generic.obs] ++ ++#include <experimental/filesystem> ++#include <testsuite_fs.h> ++#include <testsuite_hooks.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path p2(p), p3; ++ p2.swap(p3); ++ VERIFY( p2 == path() ); ++ VERIFY( p3 == p ); ++ p2.swap(p3); ++ VERIFY( p2 == p ); ++ VERIFY( p3 == path() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,61 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo/bar.txt").extension() == path(".txt") ); ++ VERIFY( path("/foo/bar.baz.txt").extension() == path(".txt") ); ++ VERIFY( path(".bar.baz.txt").extension() == path(".txt") ); ++ ++ VERIFY( path(".hidden").extension() == path(".hidden") ); ++ ++ VERIFY( path().extension() == path() ); ++ VERIFY( path(".").extension() == path() ); ++ VERIFY( path("..").extension() == path() ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ auto stem = p.stem(); ++ auto ext = p.extension(); ++ auto file = p.filename(); ++ VERIFY( stem.native() + ext.native() == file.native() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,55 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p1 = "foo/bar"; ++ VERIFY( p1.root_path() == path() ); ++ path p2 = "/foo/bar"; ++ VERIFY( p2.root_path() == path("/") ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path rootp = p.root_path(); ++ path rootn = p.root_name(); ++ path rootd = p.root_directory(); ++ VERIFY( rootp == (rootn / rootd) ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,58 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo/bar.txt").filename() == "bar.txt" ); ++ VERIFY( path("/").filename() == "/" ); ++ VERIFY( path(".").filename() == "." ); ++ VERIFY( path("..").filename() == ".." ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path f = p.filename(); ++ if (p.empty()) ++ VERIFY( f.empty() ); ++ else ++ VERIFY( f == *--p.end() ); ++ if (p != p.root_path()) ++ VERIFY( !f.has_root_path() ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,42 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo/bar.txt").extension() == ".txt" ); ++ VERIFY( path("/foo/bar.baz.txt").extension() == ".txt" ); ++ VERIFY( path(".").extension().empty() ); ++ VERIFY( path("..").extension().empty() ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,63 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p0; ++ VERIFY( p0.parent_path() == p0 ); ++ path p1 = "foo"; ++ VERIFY( p1.parent_path() == p0 ); ++ path p2 = "foo/bar"; ++ VERIFY( p2.parent_path() == p1 ); ++ path p3 = "/foo/bar"; ++ VERIFY( p3.parent_path() == path("/foo") ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ if (p.begin() == p.end()) ++ continue; ++ path pp; ++ for (auto i = p.begin(), end = --p.end(); i != end; ++i) ++ { ++ pp /= *i; ++ } ++ VERIFY( p.parent_path() == pp ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,65 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p1 = "foo"; ++ VERIFY( p1.relative_path() == p1 ); ++ path p2 = "foo/bar"; ++ VERIFY( p2.relative_path() == p2 ); ++ path p3 = "/foo/bar"; ++ VERIFY( p3.relative_path() == p2 ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ bool after_root = false; ++ const path prel = p.relative_path(); ++ VERIFY( !prel.has_root_name() ); ++ path rel; ++ for (const auto& cmpt : p) ++ { ++ if (!cmpt.has_root_path()) ++ after_root = true; ++ if (after_root) ++ rel /= cmpt; ++ } ++ VERIFY( prel == rel ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,60 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p1 = "foo/bar"; ++ VERIFY( p1.root_directory() == path() ); ++ path p2 = "/foo/bar"; ++ VERIFY( p2.root_directory() == path("/") ); ++ path p3 = "//foo"; ++ VERIFY( p3.root_directory() == path() ); ++ path p4 = "///foo"; ++ VERIFY( p4.root_directory() == path("/") ); ++} ++ ++void ++test02() ++{ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ path rootdir = p.root_directory(); ++ // If root-directory is composed of 'slash name', ++ // 'slash' is excluded from the returned string. ++ if (!rootdir.empty() && rootdir.native() != "/") ++ VERIFY( rootdir.native()[0] != '/' ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,53 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.4.9 path decomposition [path.decompose] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ VERIFY( path("/foo/bar.txt").stem() == path("bar") ); ++ path p = "foo.bar.baz.tar"; ++ std::vector<std::string> v; ++ for (; !p.extension().empty(); p = p.stem()) ++ v.push_back(p.extension().native()); ++ VERIFY( v.at(0) == ".tar" ); ++ VERIFY( v.at(1) == ".baz" ); ++ VERIFY( v.at(2) == ".bar" ); ++ ++ VERIFY( path(".hidden").stem() == path() ); ++ ++ VERIFY( path().stem() == path() ); ++ VERIFY( path(".").stem() == path(".") ); ++ VERIFY( path("..").stem() == path("..") ); ++} ++ ++int ++main() ++{ ++ test01(); ++} +Index: libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc (.../branches/gcc-5-branch) +@@ -0,0 +1,86 @@ ++// { dg-options "-std=gnu++11 -lstdc++fs" } ++// { dg-require-filesystem-ts "" } ++ ++// Copyright (C) 2014-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/>. ++ ++// 8.5 path iterators [path.itr] ++ ++#include <experimental/filesystem> ++#include <vector> ++#include <algorithm> ++#include <testsuite_hooks.h> ++#include <testsuite_fs.h> ++ ++using std::experimental::filesystem::path; ++ ++void ++test01() ++{ ++ path p; ++ VERIFY( p.begin() == p.end() ); ++ ++ std::vector<path> v, v2; ++ ++ p = "/"; ++ v.assign(p.begin(), p.end()); ++ v2 = { "/" }; ++ VERIFY( v == v2 ); ++ ++ p = "filename"; ++ v.assign(p.begin(), p.end()); ++ v2 = { "filename" }; ++ VERIFY( v == v2 ); ++ ++ p = "dir/"; ++ v.assign(p.begin(), p.end()); ++ v2 = { "dir", "." }; ++ VERIFY( v == v2 ); ++ ++ p = "//rootname/dir/"; ++ v.assign(p.begin(), p.end()); ++ v2 = { "//rootname", "/", "dir", "." }; ++ VERIFY( v == v2 ); ++ ++ p = "//rootname/dir/filename"; ++ v.assign(p.begin(), p.end()); ++ v2 = { "//rootname", "/", "dir", "filename" }; ++ VERIFY( v == v2 ); ++} ++ ++void ++test02() ++{ ++ using reverse_iterator = std::reverse_iterator<path::iterator>; ++ std::vector<path> fwd, rev; ++ ++ for (const path& p : __gnu_test::test_paths) ++ { ++ const auto begin = p.begin(), end = p.end(); ++ fwd.assign(begin, end); ++ rev.assign(reverse_iterator(end), reverse_iterator(begin)); ++ VERIFY( fwd.size() == rev.size() ); ++ VERIFY( std::equal(fwd.begin(), fwd.end(), rev.rbegin()) ); ++ } ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/util/testsuite_fs.h +=================================================================== +--- a/src/libstdc++-v3/testsuite/util/testsuite_fs.h (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/testsuite/util/testsuite_fs.h (.../branches/gcc-5-branch) +@@ -0,0 +1,93 @@ ++// -*- C++ -*- ++// Filesystem utils for the C++ library testsuite. ++// ++// Copyright (C) 2014-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/>. ++// ++ ++#ifndef _TESTSUITE_FS_H ++#define _TESTSUITE_FS_H 1 ++ ++#include <experimental/filesystem> ++#include <iostream> ++#include <string> ++#include <cstdio> ++#include <stdlib.h> ++#include <unistd.h> ++ ++namespace __gnu_test ++{ ++#define PATH_CHK(p1, p2, fn) \ ++ if ( p1.fn() != p2.fn() ) \ ++ throw std::experimental::filesystem::filesystem_error( #fn, p1, p2, \ ++ std::make_error_code(std::errc::invalid_argument) ) ++ ++ void ++ compare_paths(const std::experimental::filesystem::path& p1, ++ const std::experimental::filesystem::path& p2) ++ { ++ // std::cout << "Comparing " << p1 << " and " << p2 << std::endl; ++ PATH_CHK( p1, p2, string ); ++ PATH_CHK( p1, p2, empty ); ++ PATH_CHK( p1, p2, has_root_path ); ++ PATH_CHK( p1, p2, has_root_name ); ++ PATH_CHK( p1, p2, has_root_directory ); ++ PATH_CHK( p1, p2, has_relative_path ); ++ PATH_CHK( p1, p2, has_parent_path ); ++ PATH_CHK( p1, p2, has_filename ); ++ PATH_CHK( p1, p2, has_stem ); ++ PATH_CHK( p1, p2, has_extension ); ++ PATH_CHK( p1, p2, is_absolute ); ++ PATH_CHK( p1, p2, is_relative ); ++ auto d1 = std::distance(p1.begin(), p1.end()); ++ auto d2 = std::distance(p2.begin(), p2.end()); ++ if( d1 != d2 ) ++ throw std::experimental::filesystem::filesystem_error( ++ "distance(begin, end)", p1, p2, ++ std::make_error_code(std::errc::invalid_argument) ); ++ } ++ ++ const std::string test_paths[] = { ++ "", "/", "//", "/.", "/./", "/a", "/a/", "/a//", "/a/b/c/d", "/a//b", ++ "a", "a/b", "a/b/", "a/b/c", "a/b/c.d", "a/b/..", "a/b/c.", "a/b/.c" ++ }; ++ ++ // This is NOT supposed to be a secure way to get a unique name! ++ // We just need a path that doesn't exist for testing purposes. ++ std::experimental::filesystem::path ++ nonexistent_path() ++ { ++ std::experimental::filesystem::path p; ++#if defined(_GNU_SOURCE) || _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L ++ char tmp[] = "test.XXXXXX"; ++ int fd = ::mkstemp(tmp); ++ if (fd == -1) ++ throw std::experimental::filesystem::filesystem_error("mkstemp failed", ++ std::error_code(errno, std::generic_category())); ++ ::unlink(tmp); ++ ::close(fd); ++ p = tmp; ++#else ++ char buf[64]; ++ std::sprintf(buf, "test.%lu", (unsigned long)::getpid()); ++ p = buf; ++#endif ++ return p; ++ } ++ ++} // namespace __gnu_test ++#endif +Index: libstdc++-v3/config.h.in +=================================================================== +--- a/src/libstdc++-v3/config.h.in (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/config.h.in (.../branches/gcc-5-branch) +@@ -54,6 +54,9 @@ + /* Define to 1 if you have the `cosl' function. */ + #undef HAVE_COSL + ++/* Define to 1 if you have the <dirent.h> header file. */ ++#undef HAVE_DIRENT_H ++ + /* Define to 1 if you have the <dlfcn.h> header file. */ + #undef HAVE_DLFCN_H + +@@ -132,6 +135,9 @@ + /* Define to 1 if you have the `fabsl' function. */ + #undef HAVE_FABSL + ++/* Define to 1 if you have the <fcntl.h> header file. */ ++#undef HAVE_FCNTL_H ++ + /* Define to 1 if you have the <fenv.h> header file. */ + #undef HAVE_FENV_H + +@@ -406,6 +412,9 @@ + /* Define to 1 if you have the <sys/sem.h> header file. */ + #undef HAVE_SYS_SEM_H + ++/* Define to 1 if you have the <sys/statvfs.h> header file. */ ++#undef HAVE_SYS_STATVFS_H ++ + /* Define to 1 if you have the <sys/stat.h> header file. */ + #undef HAVE_SYS_STAT_H + +@@ -451,6 +460,9 @@ + /* Defined if usleep exists. */ + #undef HAVE_USLEEP + ++/* Define to 1 if you have the <utime.h> header file. */ ++#undef HAVE_UTIME_H ++ + /* Defined if vfwscanf exists. */ + #undef HAVE_VFWSCANF + +@@ -726,6 +738,9 @@ + /* Define if gthreads library is available. */ + #undef _GLIBCXX_HAS_GTHREADS + ++/* Define to 1 if `d_type' is a member of `struct dirent'. */ ++#undef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE ++ + /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ + #undef _GLIBCXX_HOSTED + +@@ -824,6 +839,12 @@ + this host. */ + #undef _GLIBCXX_USE_DECIMAL_FLOAT + ++/* Define if fchmod is available in <sys/stat.h>. */ ++#undef _GLIBCXX_USE_FCHMOD ++ ++/* Define if fchmodat is available in <sys/stat.h>. */ ++#undef _GLIBCXX_USE_FCHMODAT ++ + /* Define if __float128 is supported on this host. */ + #undef _GLIBCXX_USE_FLOAT128 + +@@ -858,6 +879,9 @@ + of TR1 (Chapter 5.1). */ + #undef _GLIBCXX_USE_RANDOM_TR1 + ++/* Define if realpath is available in <stdlib.h>. */ ++#undef _GLIBCXX_USE_REALPATH ++ + /* Defined if sched_yield is available. */ + #undef _GLIBCXX_USE_SCHED_YIELD + +@@ -867,6 +891,12 @@ + /* Define if _SC_NPROC_ONLN is available in <unistd.h>. */ + #undef _GLIBCXX_USE_SC_NPROC_ONLN + ++/* Define if sendfile is available in <sys/stat.h>. */ ++#undef _GLIBCXX_USE_SENDFILE ++ ++/* Define if struct stat has timespec members. */ ++#undef _GLIBCXX_USE_ST_MTIM ++ + /* Define if sysctl(), CTL_HW and HW_NCPU are available in <sys/sysctl.h>. */ + #undef _GLIBCXX_USE_SYSCTL_HW_NCPU + +@@ -873,6 +903,10 @@ + /* Define if obsolescent tmpnam is available in <stdio.h>. */ + #undef _GLIBCXX_USE_TMPNAM + ++/* Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and ++ AT_FDCWD in <fcntl.h>. */ ++#undef _GLIBCXX_USE_UTIMENSAT ++ + /* Define if code specialized for wchar_t should be used. */ + #undef _GLIBCXX_USE_WCHAR_T + +Index: libstdc++-v3/acinclude.m4 +=================================================================== +--- a/src/libstdc++-v3/acinclude.m4 (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/acinclude.m4 (.../branches/gcc-5-branch) +@@ -49,7 +49,7 @@ + # Keep these sync'd with the list in Makefile.am. The first provides an + # expandable list at autoconf time; the second provides an expandable list + # (i.e., shell variable) at configure time. +- m4_define([glibcxx_SUBDIRS],[include libsupc++ python src src/c++98 src/c++11 doc po testsuite]) ++ m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/filesystem doc po testsuite python]) + SUBDIRS='glibcxx_SUBDIRS' + + # These need to be absolute paths, yet at the same time need to +@@ -3905,7 +3905,168 @@ + GLIBCXX_CONDITIONAL(ENABLE_CXX11_ABI, test $glibcxx_cxx11_abi = 1) + ]) + ++dnl ++dnl Check to see whether to build libstdc++fs.a ++dnl ++dnl --enable-libstdcxx-filesystem-ts ++dnl ++AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [ ++ GLIBCXX_ENABLE(libstdcxx-filesystem-ts,auto,, ++ [turns on ISO/IEC TS 18822 support], ++ [permit yes|no|auto]) + ++ AC_MSG_CHECKING([whether to build Filesystem TS support]) ++ if test x"$ac_cv_header_dirent_h" != x"yes"; then ++ enable_libstdcxx_filesystem_ts=no ++ fi ++ if test x"$enable_libstdcxx_filesystem_ts" = x"auto"; then ++ case "${target_os}" in ++ freebsd*|netbsd*|openbsd*|dragonfly*|darwin*) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ solaris*) ++ enable_libstdcxx_filesystem_ts=yes ++ ;; ++ *) ++ enable_libstdcxx_filesystem_ts=no ++ ;; ++ esac ++ fi ++ AC_MSG_RESULT($enable_libstdcxx_filesystem_ts) ++ GLIBCXX_CONDITIONAL(ENABLE_FILESYSTEM_TS, test $enable_libstdcxx_filesystem_ts = yes) ++]) ++ ++dnl ++dnl Check whether the library calls required by the Filesystem TS are present ++dnl and define _GLIBCXX_USE_REALPATH and _GLIBCXX_USE_UTIMENSAT. ++dnl ++AC_DEFUN([GLIBCXX_CHECK_FILESYSTEM_DEPS], [dnl ++dnl ++ AC_LANG_SAVE ++ AC_LANG_CPLUSPLUS ++ ac_save_CXXFLAGS="$CXXFLAGS" ++ CXXFLAGS="$CXXFLAGS -fno-exceptions" ++dnl ++ AC_MSG_CHECKING([for struct dirent.d_type]) ++ AC_CACHE_VAL(glibcxx_cv_dirent_d_type, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [#include <dirent.h>], ++ [ ++ struct dirent d; ++ if (sizeof d.d_type) return 0; ++ ], ++ [glibcxx_cv_dirent_d_type=yes], ++ [glibcxx_cv_dirent_d_type=no]) ++ ]) ++ if test $glibcxx_cv_dirent_d_type = yes; then ++ AC_DEFINE(_GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE, 1, [Define to 1 if `d_type' is a member of `struct dirent'.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_dirent_d_type) ++dnl ++ AC_MSG_CHECKING([for realpath]) ++ AC_CACHE_VAL(glibcxx_cv_realpath, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [#include <stdlib.h>], ++ [char *tmp = realpath((const char*)NULL, (char*)NULL);], ++ [glibcxx_cv_realpath=yes], ++ [glibcxx_cv_realpath=no]) ++ ]) ++ if test $glibcxx_cv_realpath = yes; then ++ AC_DEFINE(_GLIBCXX_USE_REALPATH, 1, [Define if realpath is available in <stdlib.h>.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_realpath) ++dnl ++ AC_MSG_CHECKING([for utimensat]) ++ AC_CACHE_VAL(glibcxx_cv_utimensat, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ], ++ [ ++ struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } }; ++ int i = utimensat(AT_FDCWD, "path", ts, 0); ++ ], ++ [glibcxx_cv_utimensat=yes], ++ [glibcxx_cv_utimensat=no]) ++ ]) ++ if test $glibcxx_cv_utimensat = yes; then ++ AC_DEFINE(_GLIBCXX_USE_UTIMENSAT, 1, [Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_utimensat) ++dnl ++ AC_MSG_CHECKING([for struct stat.st_mtim.tv_nsec]) ++ AC_CACHE_VAL(glibcxx_cv_st_mtim, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [ #include <sys/stat.h> ], ++ [ ++ struct stat st; ++ return st.st_mtim.tv_nsec; ++ ], ++ [glibcxx_cv_st_mtim=yes], ++ [glibcxx_cv_st_mtim=no]) ++ ]) ++ if test $glibcxx_cv_st_mtim = yes; then ++ AC_DEFINE(_GLIBCXX_USE_ST_MTIM, 1, [Define if struct stat has timespec members.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_st_mtim) ++dnl ++ AC_MSG_CHECKING([for fchmod]) ++ AC_CACHE_VAL(glibcxx_cv_fchmod, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [#include <sys/stat.h>], ++ [fchmod(1, S_IWUSR);], ++ [glibcxx_cv_fchmod=yes], ++ [glibcxx_cv_fchmod=no]) ++ ]) ++ if test $glibcxx_cv_fchmod = yes; then ++ AC_DEFINE(_GLIBCXX_USE_FCHMOD, 1, [Define if fchmod is available in <sys/stat.h>.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_fchmod) ++dnl ++ AC_MSG_CHECKING([for fchmodat]) ++ AC_CACHE_VAL(glibcxx_cv_fchmodat, [dnl ++ GCC_TRY_COMPILE_OR_LINK( ++ [ ++ #include <fcntl.h> ++ #include <sys/stat.h> ++ ], ++ [fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);], ++ [glibcxx_cv_fchmodat=yes], ++ [glibcxx_cv_fchmodat=no]) ++ ]) ++ if test $glibcxx_cv_fchmodat = yes; then ++ AC_DEFINE(_GLIBCXX_USE_FCHMODAT, 1, [Define if fchmodat is available in <sys/stat.h>.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_fchmodat) ++dnl ++ AC_MSG_CHECKING([for sendfile that can copy files]) ++ AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl ++ case "${target_os}" in ++ gnu* | linux* | solaris*) ++ GCC_TRY_COMPILE_OR_LINK( ++ [#include <sys/sendfile.h>], ++ [sendfile(1, 2, (off_t*)NULL, sizeof 1);], ++ [glibcxx_cv_sendfile=yes], ++ [glibcxx_cv_sendfile=no]) ++ ;; ++ *) ++ glibcxx_cv_sendfile=no ++ ;; ++ esac ++ ]) ++ if test $glibcxx_cv_sendfile = yes; then ++ AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/stat.h>.]) ++ fi ++ AC_MSG_RESULT($glibcxx_cv_sendfile) ++dnl ++ CXXFLAGS="$ac_save_CXXFLAGS" ++ AC_LANG_RESTORE ++]) ++ + # Macros from the top-level gcc directory. + m4_include([../config/gc++filt.m4]) + m4_include([../config/tls.m4]) +Index: libstdc++-v3/aclocal.m4 +=================================================================== +--- a/src/libstdc++-v3/aclocal.m4 (.../tags/gcc_5_2_0_release) ++++ b/src/libstdc++-v3/aclocal.m4 (.../branches/gcc-5-branch) +@@ -1,7 +1,8 @@ +-# generated automatically by aclocal 1.11.1 -*- Autoconf -*- ++# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, ++# Inc. + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -19,12 +20,15 @@ + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software ++# Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + ++# serial 1 ++ + # AM_AUTOMAKE_VERSION(VERSION) + # ---------------------------- + # Automake X.Y traces this macro to ensure aclocal.m4 has been +@@ -34,7 +38,7 @@ + [am__api_version='1.11' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.11.1], [], ++m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -50,7 +54,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.11.1])dnl ++[AM_AUTOMAKE_VERSION([1.11.6])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +@@ -57,12 +61,14 @@ + + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + +-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + ++# serial 1 ++ + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets + # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to + # `$srcdir', `$srcdir/..', or `$srcdir/../..'. +@@ -283,12 +289,15 @@ + done + echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, ++# Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + ++# serial 1 ++ + # AM_PROG_INSTALL_SH + # ------------------ + # Define $install_sh. +@@ -307,8 +316,8 @@ + # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- + # From Jim Meyering + +-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +-# Free Software Foundation, Inc. ++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, ++# 2011 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -328,7 +337,7 @@ + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) ++AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful +@@ -387,12 +396,15 @@ + fi + ]) + +-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, ++# Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + ++# serial 1 ++ + # AM_PROG_MKDIR_P + # --------------- + # Check for `mkdir -p'. +@@ -415,13 +427,14 @@ + + # Helper functions for option handling. -*- Autoconf -*- + +-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software ++# Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + +-# serial 4 ++# serial 5 + + # _AM_MANGLE_OPTION(NAME) + # ----------------------- +@@ -429,13 +442,13 @@ + [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + + # _AM_SET_OPTION(NAME) +-# ------------------------------ ++# -------------------- + # Set option NAME. Presently that only means defining a flag for this option. + AC_DEFUN([_AM_SET_OPTION], + [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + + # _AM_SET_OPTIONS(OPTIONS) +-# ---------------------------------- ++# ------------------------ + # OPTIONS is a space-separated list of Automake options. + AC_DEFUN([_AM_SET_OPTIONS], + [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +@@ -511,12 +524,14 @@ + fi + AC_MSG_RESULT(yes)]) + +-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + ++# serial 1 ++ + # AM_PROG_INSTALL_STRIP + # --------------------- + # One issue with vendor `install' (even GNU) is that you can't +@@ -539,13 +554,13 @@ + INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +-# Copyright (C) 2006, 2008 Free Software Foundation, Inc. ++# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + +-# serial 2 ++# serial 3 + + # _AM_SUBST_NOTMAKE(VARIABLE) + # --------------------------- +@@ -554,13 +569,13 @@ + AC_DEFUN([_AM_SUBST_NOTMAKE]) + + # AM_SUBST_NOTMAKE(VARIABLE) +-# --------------------------- ++# -------------------------- + # Public sister of _AM_SUBST_NOTMAKE. + AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + + # Check how to create a tarball. -*- Autoconf -*- + +-# Copyright (C) 2004, 2005 Free Software Foundation, Inc. ++# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -582,10 +597,11 @@ + # a tarball read from stdin. + # $(am__untar) < result.tar + AC_DEFUN([_AM_PROG_TAR], +-[# Always define AMTAR for backward compatibility. +-AM_MISSING_PROG([AMTAR], [tar]) ++[# Always define AMTAR for backward compatibility. Yes, it's still used ++# in the wild :-( We should find a proper way to deprecate it ... ++AC_SUBST([AMTAR], ['$${TAR-tar}']) + m4_if([$1], [v7], +- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], ++ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) + AC_MSG_CHECKING([how to create a $1 tar archive]) Index: libgcc/ChangeLog =================================================================== --- a/src/libgcc/ChangeLog (.../tags/gcc_5_2_0_release) @@ -538,6 +11528,24 @@ Index: gcc/tree-chkp.h extern void chkp_expand_bounds_reset_for_mem (tree mem, tree ptr); extern tree chkp_insert_retbnd_call (tree bndval, tree retval, gimple_stmt_iterator *gsi); +Index: gcc/c-family/ChangeLog +=================================================================== +--- a/src/gcc/c-family/ChangeLog (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/c-family/ChangeLog (.../branches/gcc-5-branch) +@@ -1,3 +1,13 @@ ++2015-08-11 Marek Polacek <polacek@redhat.com> ++ ++ Backported from mainline ++ 2015-08-03 Marek Polacek <polacek@redhat.com> ++ ++ PR sanitizer/66908 ++ * c-ubsan.c: Include gimplify.h. ++ (ubsan_instrument_division): Unshare OP0 and OP1. ++ (ubsan_instrument_shift): Likewise. ++ + 2015-07-16 Release Manager + + * GCC 5.2.0 released. Index: gcc/c-family/c-common.c =================================================================== --- a/src/gcc/c-family/c-common.c (.../tags/gcc_5_2_0_release) @@ -551,6 +11559,38 @@ Index: gcc/c-family/c-common.c { warning_at (loc, OPT_Winvalid_memory_model, "invalid memory model argument %d of %qE", x + 1, +Index: gcc/c-family/c-ubsan.c +=================================================================== +--- a/src/gcc/c-family/c-ubsan.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/c-family/c-ubsan.c (.../branches/gcc-5-branch) +@@ -55,6 +55,7 @@ + #include "internal-fn.h" + #include "stor-layout.h" + #include "builtins.h" ++#include "gimplify.h" + + /* Instrument division by zero and INT_MIN / -1. If not instrumenting, + return NULL_TREE. */ +@@ -71,6 +72,9 @@ + gcc_assert (TYPE_MAIN_VARIANT (TREE_TYPE (op0)) + == TYPE_MAIN_VARIANT (TREE_TYPE (op1))); + ++ op0 = unshare_expr (op0); ++ op1 = unshare_expr (op1); ++ + if (TREE_CODE (type) == INTEGER_TYPE + && (flag_sanitize & SANITIZE_DIVIDE)) + t = fold_build2 (EQ_EXPR, boolean_type_node, +@@ -151,6 +155,9 @@ + HOST_WIDE_INT op0_prec = TYPE_PRECISION (type0); + tree uprecm1 = build_int_cst (op1_utype, op0_prec - 1); + ++ op0 = unshare_expr (op0); ++ op1 = unshare_expr (op1); ++ + t = fold_convert_loc (loc, op1_utype, op1); + t = fold_build2 (GT_EXPR, boolean_type_node, t, uprecm1); + Index: gcc/lra-int.h =================================================================== --- a/src/gcc/lra-int.h (.../tags/gcc_5_2_0_release) @@ -665,7 +11705,7 @@ Index: gcc/DATESTAMP +++ b/src/gcc/DATESTAMP (.../branches/gcc-5-branch) @@ -1 +1 @@ -20150716 -+20150808 ++20150819 Index: gcc/postreload.c =================================================================== --- a/src/gcc/postreload.c (.../tags/gcc_5_2_0_release) @@ -957,7 +11997,15 @@ Index: gcc/jit/ChangeLog =================================================================== --- a/src/gcc/jit/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/gcc/jit/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,24 @@ +@@ -1,3 +1,32 @@ ++2015-08-13 David Malcolm <dmalcolm@redhat.com> ++ ++ Backport from mainline r226882 ++ 2015-08-13 David Malcolm <dmalcolm@redhat.com> ++ ++ * jit-playback.c (invoke_driver): On OS X, add ++ "-Wl,-undefined,dynamic_lookup" to the driver arguments. ++ +2015-07-23 David Malcolm <dmalcolm@redhat.com> + + Backport from mainline r226126 @@ -1048,16 +12096,26 @@ Index: gcc/jit/jit-playback.c if (shared) ADD_ARG ("-shared"); -@@ -2460,7 +2462,7 @@ +@@ -2459,8 +2461,17 @@ + time. */ ADD_ARG ("-fno-use-linker-plugin"); ++#if defined (DARWIN_X86) || defined (DARWIN_PPC) ++ /* OS X's linker defaults to treating undefined symbols as errors. ++ If the context has any imported functions or globals they will be ++ undefined until the .so is dynamically-linked into the process. ++ Ensure that the driver passes in "-undefined dynamic_lookup" to the ++ linker. */ ++ ADD_ARG ("-Wl,-undefined,dynamic_lookup"); ++#endif ++ /* pex argv arrays are NULL-terminated. */ - ADD_ARG (NULL); + argvec.safe_push (NULL); /* pex_one's error-handling requires pname to be non-NULL. */ gcc_assert (ctxt_progname); -@@ -2501,6 +2503,36 @@ +@@ -2501,6 +2512,36 @@ #undef ADD_ARG } @@ -1112,7 +12170,50 @@ Index: gcc/ChangeLog =================================================================== --- a/src/gcc/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/gcc/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,460 @@ +@@ -1,3 +1,503 @@ ++2015-08-18 Segher Boessenkool <segher@kernel.crashing.org> ++ ++ Backport from mainline: ++ 2015-08-08 Segher Boessenkool <segher@kernel.crashing.org> ++ ++ PR rtl-optimization/67028 ++ * combine.c (simplify_comparison): Fix comment. Rearrange code. ++ Add test to see if a const_int fits in the new mode. ++ ++2015-08-17 Jason Merrill <jason@redhat.com> ++ ++ PR c++/65734 ++ * stor-layout.c (layout_type): Layout the TYPE_MAIN_VARIANT. ++ (finalize_type_size): Respect TYPE_USER_ALIGN. ++ (layout_type) [ARRAY_TYPE]: Likewise. ++ ++2015-08-17 Yvan Roux <yvan.roux@linaro.org> ++ ++ Backport from mainline: ++ 2015-08-12 Yvan Roux <yvan.roux@linaro.org> ++ ++ PR target/67127 ++ * config/arm/arm.md (movdi): Restrict illegitimate ldrd/strd checking ++ to ARM core registers. ++ ++2015-08-16 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline: ++ 2015-07-25 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/66648 ++ * config/i386/i386.c (ix86_expand_set_or_movmem): Emit main loop ++ execution guard when min_size is less than size_needed. ++ ++2015-08-11 Thomas Preud'homme <thomas.preudhomme@arm.com> ++ ++ Backport from mainline ++ 2015-07-28 Thomas Preud'homme <thomas.preudhomme@arm.com> ++ ++ PR tree-optimization/66828 ++ * tree-ssa-math-opts.c (perform_symbolic_merge): Change type of inc ++ from int64_t to uint64_t. ++ +2015-08-07 Kaz Kojima <kkojima@gcc.gnu.org> + + Backport from mainline @@ -1573,7 +12674,7 @@ Index: gcc/ChangeLog 2015-07-16 Release Manager * GCC 5.2.0 released. -@@ -119,8 +576,8 @@ +@@ -119,8 +619,8 @@ 2015-07-09 Iain Sandoe <iain@codesourcery.com> PR target/66523 @@ -2133,6 +13234,44 @@ Index: gcc/testsuite/gcc.target/aarch64/fnmul-4.c + /* { dg-final { scan-assembler "fnmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */ + return -(a * b); +} +Index: gcc/testsuite/gcc.target/i386/pr66648.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr66648.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr66648.c (.../branches/gcc-5-branch) +@@ -0,0 +1,33 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -mstringop-strategy=unrolled_loop -mtune=nocona" } */ ++ ++#define PATTERN 0xdeadbeef ++#define SIZE 32 ++ ++struct S { int i; char str[SIZE]; int j; }; ++ ++void __attribute__((noclone, noinline)) ++my_memcpy (char *, const char *, unsigned int); ++ ++void ++my_memcpy (char *dst, const char *src, unsigned int len) ++{ ++ if (len < 8) ++ __builtin_abort (); ++ ++ __builtin_memcpy (dst, src, len); ++} ++ ++int ++main (void) ++{ ++ const char str[SIZE]= "1234567890123456789012345678901"; ++ struct S *s = __builtin_malloc (sizeof (struct S)); ++ ++ s->j = PATTERN; ++ my_memcpy (s->str, str, SIZE); ++ if (s->j != PATTERN) ++ __builtin_abort (); ++ ++ return 0; ++} Index: gcc/testsuite/gcc.target/i386/pr66691.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/pr66691.c (.../tags/gcc_5_2_0_release) @@ -3359,11 +14498,61 @@ Index: gcc/testsuite/gcc.dg/lto/chkp-removed-alias_0.c +{ + return s.fnptr[argc] (argv[0]); +} +Index: gcc/testsuite/gcc.dg/pr67028.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr67028.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/gcc.dg/pr67028.c (.../branches/gcc-5-branch) +@@ -0,0 +1,21 @@ ++/* { dg-do run } */ ++/* { dg-options "-O3" } */ ++ ++short c = 0; ++ ++int __attribute__ ((noinline)) f(void) ++{ ++ int d = 5; ++ signed char e = (c != 1) * -2; ++ int a = (unsigned short)e > d; ++ ++ return a; ++} ++ ++int main(void) ++{ ++ if (!f()) ++ __builtin_abort(); ++ ++ return 0; ++} Index: gcc/testsuite/ChangeLog =================================================================== --- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,338 @@ +@@ -1,3 +1,362 @@ ++2015-08-18 Segher Boessenkool <segher@kernel.crashing.org> ++ ++ Backport from mainline: ++ 2015-08-08 Segher Boessenkool <segher@kernel.crashing.org> ++ ++ PR rtl-optimization/67028 ++ * gcc.dg/pr67028.c: New testcase. ++ ++2015-08-16 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline: ++ 2015-07-25 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/66648 ++ * gcc.target/i386/pr66648.c: New test. ++ ++2015-08-11 Marek Polacek <polacek@redhat.com> ++ ++ Backported from mainline ++ 2015-08-03 Marek Polacek <polacek@redhat.com> ++ ++ PR sanitizer/66908 ++ * c-c++-common/ubsan/pr66908.c: New test. ++ +2015-08-07 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/66929 @@ -3702,7 +14891,7 @@ Index: gcc/testsuite/ChangeLog 2015-07-16 Release Manager * GCC 5.2.0 released. -@@ -792,7 +1127,7 @@ +@@ -792,7 +1151,7 @@ Add missing ChangeLog entry for r222341. Backport from trunk r222273 @@ -3711,6 +14900,61 @@ Index: gcc/testsuite/ChangeLog * gcc.target/i386/avx512bw-vpermi2w-2.c: Fix includes to use actual headers. * gcc.target/i386/avx512bw-vpermt2w-2.c: Likewise. +Index: gcc/testsuite/g++.dg/cpp0x/alignas1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/alignas1.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/alignas1.C (.../branches/gcc-5-branch) +@@ -0,0 +1,16 @@ ++// PR c++/65734 ++// { dg-do compile { target c++11 } } ++ ++template <class T> struct A ++{ ++ T t; ++}; ++ ++typedef A<int> T[4] alignas (2 * alignof (int)); ++A<int> a[4]; ++ ++typedef A<char> T2[4] alignas (2 * alignof (int)); ++ ++#define SA(X) static_assert((X),#X) ++SA(alignof (T) == 2 * alignof(int)); ++SA(alignof (T2) == 2 * alignof(int)); +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested5.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested5.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested5.C (.../branches/gcc-5-branch) +@@ -0,0 +1,29 @@ ++// PR c++/67244 ++// { dg-do compile { target c++11 } } ++ ++class A { ++public: ++ int operator*(); ++}; ++template <typename T, typename Predicate> ++void searchGen(int, int, T, Predicate p4) { ++ p4(0); ++} ++template <typename...> struct B; ++template <typename MetaFunction, typename Type, typename... Types> ++struct B<MetaFunction, Type, Types...> { ++ static void exec() { MetaFunction::template exec<Type>; } ++}; ++template <typename MetaFunction, typename... Types> void forEachType() { ++ B<MetaFunction, Types...>::exec; ++} ++namespace { ++struct C { ++ template <typename T> void exec() { ++ A __trans_tmp_1; ++ const auto target = *__trans_tmp_1; ++ searchGen(0, 0, 0, [=](T) { [=] { target; }; }); ++ } ++}; ++} ++void ____C_A_T_C_H____T_E_S_T____75() { forEachType<C, int>; } Index: gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C (.../tags/gcc_5_2_0_release) @@ -3740,6 +14984,31 @@ Index: gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C +int main() { + static_assert(A(42), ""); +} +Index: gcc/testsuite/g++.dg/cpp0x/alignas2.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/alignas2.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/alignas2.C (.../branches/gcc-5-branch) +@@ -0,0 +1,20 @@ ++// PR c++/65734 ++// { dg-do compile { target c++11 } } ++ ++template <typename T> ++struct BVector ++{ ++ T t; ++}; ++BVector<int> m; ++ ++template <template <class> class T> ++struct BV2 ++{ ++ typedef T<float> value_type alignas (16); ++ value_type v; ++}; ++BV2<BVector> m2; ++ ++#define SA(X) static_assert((X),#X) ++SA(alignof (BV2<BVector>::value_type) == 16); Index: gcc/testsuite/g++.dg/cpp1y/var-templ43.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp1y/var-templ43.C (.../tags/gcc_5_2_0_release) @@ -3825,6 +15094,87 @@ Index: gcc/testsuite/g++.dg/cpp1y/var-templ40.C + +template<class T> T val2 = 0; +auto&& x2 = val2<int&&>; +Index: gcc/testsuite/g++.dg/cpp1y/var-templ44.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp1y/var-templ44.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp1y/var-templ44.C (.../branches/gcc-5-branch) +@@ -0,0 +1,29 @@ ++// PR c++/67161 ++// { dg-do compile { target c++14 } } ++ ++template <typename _Tp> struct integral_constant { ++ static constexpr _Tp value = 0; ++}; ++template <bool, typename, typename> struct conditional; ++template <typename...> struct __or_; ++template <typename _B1, typename _B2> ++struct __or_<_B1, _B2> : conditional<1, _B1, _B2>::type {}; ++template <typename...> struct __and_; ++template <typename> struct __not_ : integral_constant<bool> {}; ++template <typename> struct __is_void_helper : integral_constant<bool> {}; ++template <typename> struct is_void : __is_void_helper<int> {}; ++template <bool, typename _Iftrue, typename> struct conditional { ++ typedef _Iftrue type; ++}; ++template <bool _Cond, typename _Iftrue, typename _Iffalse> ++using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; ++template <typename...> using common_type_t = int; ++template <typename, int> struct array {}; ++template <typename _Tp> constexpr int is_void_v = is_void<_Tp>::value; ++template <typename _Dest = void, typename... _Types> ++constexpr auto make_array() ++ -> array<conditional_t<is_void_v<_Dest>, common_type_t<>, _Dest>, ++ sizeof...(_Types)> { ++ static_assert(__or_<__not_<is_void<_Dest>>, __and_<>>::value, ""); // { dg-error "static assert" } ++} ++auto d = make_array(); +Index: gcc/testsuite/g++.dg/cpp1y/auto-fn27.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C (.../branches/gcc-5-branch) +@@ -0,0 +1,42 @@ ++// PR c++/66919 ++// { dg-do compile { target c++14 } } ++ ++template <int> ++struct A { ++ template <typename F, typename R, typename T> ++ static auto run (F fn, R, T) { auto r = fn (); } // { dg-error "" } ++}; ++template <typename F, typename T> ++auto foo (F fn, T) ++{ ++ A <0>::run (fn, 0, 0); ++} ++struct B; ++struct C { ++ typedef B D; ++}; ++struct E { ++ virtual void bar (const int &); ++}; ++template <typename C> ++struct F : E { ++ typedef typename C::D::G G; ++ void bar (const G &); ++ typename C::D::H I; ++}; ++struct J { struct K {}; }; ++template <typename T> ++void ++F<T>::bar (const G &) ++{ ++ auto s = I; ++ typedef decltype (s) L; ++ auto u =[&](L) { auto t = foo (J::K (), 0); }; // { dg-error "" } ++} ++struct B { ++ typedef int G; ++ typedef int H; ++}; ++struct M : F <C> { ++ M () {} ++}; Index: gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice3.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice3.C (.../tags/gcc_5_2_0_release) @@ -3865,6 +15215,31 @@ Index: gcc/testsuite/g++.dg/cpp1y/var-templ36.C + +double d1 = v<double*>; +double d2 = A<double*>::v; +Index: gcc/testsuite/g++.dg/cpp1y/constexpr-array1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp1y/constexpr-array1.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp1y/constexpr-array1.C (.../branches/gcc-5-branch) +@@ -0,0 +1,20 @@ ++// PR c++/67104 ++// { dg-do compile { target c++14 } } ++ ++template <typename T, int N> struct array ++{ ++ constexpr T &operator[](int index) { return data[index]; } ++ constexpr T operator[](int index) const { return data[index]; } ++ T data[N]; ++}; ++ ++constexpr array<long unsigned, 1001> ++make_bottle_count () ++{ ++ array<long unsigned, 1001> a{}; ++ a[65] = 1; ++ return a; ++} ++ ++constexpr auto bottle_count = make_bottle_count (); ++static_assert (bottle_count[65], ""); Index: gcc/testsuite/g++.dg/cpp1y/var-templ33.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp1y/var-templ33.C (.../tags/gcc_5_2_0_release) @@ -3962,6 +15337,64 @@ Index: gcc/testsuite/g++.dg/abi/abi-tag15.C +// PR c++/66748 + +enum __attribute__((abi_tag("foo"))) E {}; // { dg-error "redeclaration of" } +Index: gcc/testsuite/g++.dg/init/pr66857.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/init/pr66857.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/init/pr66857.C (.../branches/gcc-5-branch) +@@ -0,0 +1,19 @@ ++// PR c++/66857 ++// { dg-do run } ++ ++const int i = 0; ++ ++struct Test ++{ ++ Test (const int &rhs) ++ { ++ if (&rhs != &i) ++ __builtin_abort (); ++ } ++}; ++ ++int ++main (void) ++{ ++ Test test = i; ++} +Index: gcc/testsuite/g++.dg/conversion/access1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/conversion/access1.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/conversion/access1.C (.../branches/gcc-5-branch) +@@ -15,7 +15,7 @@ + struct C : public P + { + // C can access P's copy ctor, but can't convert b to const P&. +- C(const B& b) : P(b) {} // { dg-error "inaccessible base" } ++ C(const B& b) : P(b) {} // { dg-error "inaccessible base" "" { xfail *-*-* } } + }; + + void foo() +Index: gcc/testsuite/g++.dg/warn/deprecated-9.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/warn/deprecated-9.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/warn/deprecated-9.C (.../branches/gcc-5-branch) +@@ -0,0 +1,16 @@ ++// PR c++/65974 ++// { dg-options "-Wdeprecated" } ++ ++struct S { ++ void bar(); ++ ++ __attribute__((deprecated("use bar() instead."))) ++ virtual void foo(); ++}; ++ ++void S::foo() { bar(); } ++ ++int main() ++{ ++ return 0; ++} Index: gcc/testsuite/g++.dg/pr66866.C =================================================================== --- a/src/gcc/testsuite/g++.dg/pr66866.C (.../tags/gcc_5_2_0_release) @@ -3996,6 +15429,153 @@ Index: gcc/testsuite/g++.dg/pr66866.C + + return 0; +} +Index: gcc/testsuite/g++.dg/inherit/access9.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/inherit/access9.C (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/inherit/access9.C (.../branches/gcc-5-branch) +@@ -0,0 +1,14 @@ ++// PR c++/66957 ++ ++class BaseClass { ++protected: ++ static int x; ++}; ++ ++struct DerivedA : BaseClass { }; ++ ++struct DerivedB : BaseClass { ++ DerivedB() { ++ (void) DerivedA::x; ++ } ++}; +Index: gcc/testsuite/c-c++-common/ubsan/pr66908.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/ubsan/pr66908.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/testsuite/c-c++-common/ubsan/pr66908.c (.../branches/gcc-5-branch) +@@ -0,0 +1,15 @@ ++/* PR sanitizer/66908 */ ++/* { dg-do compile } */ ++/* { dg-options "-fsanitize=shift,bounds -O2 -Werror=maybe-uninitialized" } */ ++/* { dg-additional-options "-std=gnu90" { target c } } */ ++ ++struct S { int a[22]; }; ++static int const e[22] = { }; ++ ++void ++foo (struct S const *s, unsigned int m, unsigned int *res) ++{ ++ unsigned int i; ++ for (i = 0; i < 22; ++i) ++ res[i] = ((s->a[i] + e[i]) << m); ++} +Index: gcc/cp/class.c +=================================================================== +--- a/src/gcc/cp/class.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/class.c (.../branches/gcc-5-branch) +@@ -1989,6 +1989,10 @@ + if (!t) + return; + ++ tree attrs = TYPE_ATTRIBUTES (t); ++ unsigned align = TYPE_ALIGN (t); ++ bool user_align = TYPE_USER_ALIGN (t); ++ + for (variants = TYPE_NEXT_VARIANT (t); + variants; + variants = TYPE_NEXT_VARIANT (variants)) +@@ -1995,8 +1999,13 @@ + { + /* These are the two fields that check_qualified_type looks at and + are affected by attributes. */ +- TYPE_ATTRIBUTES (variants) = TYPE_ATTRIBUTES (t); +- TYPE_ALIGN (variants) = TYPE_ALIGN (t); ++ TYPE_ATTRIBUTES (variants) = attrs; ++ unsigned valign = align; ++ if (TYPE_USER_ALIGN (variants)) ++ valign = MAX (valign, TYPE_ALIGN (variants)); ++ else ++ TYPE_USER_ALIGN (variants) = user_align; ++ TYPE_ALIGN (variants) = valign; + } + } + +Index: gcc/cp/constexpr.c +=================================================================== +--- a/src/gcc/cp/constexpr.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/constexpr.c (.../branches/gcc-5-branch) +@@ -1750,8 +1750,39 @@ + VERIFY_CONSTANT (ary); + gcc_unreachable (); + } +- if (compare_tree_int (index, len) >= 0) ++ ++ i = tree_to_shwi (index); ++ bool found = true; ++ if (TREE_CODE (ary) == CONSTRUCTOR && len ++ && (TREE_CODE (CONSTRUCTOR_ELT (ary, len-1)->index) == RANGE_EXPR ++ || compare_tree_int (CONSTRUCTOR_ELT (ary, len-1)->index, len-1))) + { ++ /* The last element doesn't match its position in the array; this must be ++ a sparse array from cxx_eval_store_expression. So iterate. */ ++ found = false; ++ vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (ary); ++ constructor_elt *e; ++ for (unsigned ix = 0; vec_safe_iterate (v, ix, &e); ++ix) ++ { ++ if (TREE_CODE (e->index) == RANGE_EXPR) ++ { ++ tree lo = TREE_OPERAND (e->index, 0); ++ tree hi = TREE_OPERAND (e->index, 1); ++ if (tree_int_cst_le (lo, index) && tree_int_cst_le (index, hi)) ++ found = true; ++ } ++ else if (tree_int_cst_equal (e->index, index)) ++ found = true; ++ if (found) ++ { ++ i = ix; ++ break; ++ } ++ } ++ } ++ ++ if (i >= len || !found) ++ { + if (tree_int_cst_lt (index, array_type_nelts_top (TREE_TYPE (ary)))) + { + /* If it's within the array bounds but doesn't have an explicit +@@ -1767,7 +1798,7 @@ + *non_constant_p = true; + return t; + } +- else if (tree_int_cst_lt (index, integer_zero_node)) ++ else if (i < 0) + { + if (!ctx->quiet) + error ("negative array subscript"); +@@ -1774,7 +1805,7 @@ + *non_constant_p = true; + return t; + } +- i = tree_to_shwi (index); ++ + if (TREE_CODE (ary) == CONSTRUCTOR) + return (*CONSTRUCTOR_ELTS (ary))[i].value; + else if (elem_nchars == 1) +Index: gcc/cp/error.c +=================================================================== +--- a/src/gcc/cp/error.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/error.c (.../branches/gcc-5-branch) +@@ -1230,7 +1230,8 @@ + if (args == error_mark_node) + pp_string (pp, M_("<template arguments error>")); + else if (args) +- dump_template_argument_list (pp, args, flags); ++ dump_template_argument_list ++ (pp, args, flags|TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS); + pp_cxx_end_template_argument_list (pp); + } + break; Index: gcc/cp/tree.c =================================================================== --- a/src/gcc/cp/tree.c (.../tags/gcc_5_2_0_release) @@ -4022,7 +15602,46 @@ Index: gcc/cp/ChangeLog =================================================================== --- a/src/gcc/cp/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/gcc/cp/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,55 @@ +@@ -1,3 +1,94 @@ ++2015-08-17 Jason Merrill <jason@redhat.com> ++ ++ PR c++/66957 ++ * search.c (protected_accessible_p): Revert fix for 38579. ++ ++2015-08-17 Paolo Carlini <paolo.carlini@oracle.com> ++ ++ PR c++/66919 ++ * pt.c (tsubst_copy): Pass complain to mark_used, check return value. ++ ++2015-08-17 Jason Merrill <jason@redhat.com> ++ ++ PR c++/67244 ++ * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies. ++ ++ PR c++/65734 ++ * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN. ++ ++ PR c++/67104 ++ * constexpr.c (cxx_eval_array_reference): Handle sparse ++ CONSTRUCTORs. ++ ++2015-08-14 Jason Merrill <jason@redhat.com> ++ ++ PR c++/65974 ++ * decl2.c (mark_vtable_entries): Suppress -Wdeprecated. ++ ++2015-08-14 Patrick Palka <ppalka@gcc.gnu.org> ++ ++ PR c++/66857 ++ * cvt.c (ocp_convert): Don't call scalar_constant_value when ++ converting to a class type. ++ ++2015-08-12 Jason Merrill <jason@redhat.com> ++ ++ PR c++/67161 ++ * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass ++ TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS. ++ +2015-08-06 Jason Merrill <jason@redhat.com> + + PR c++/66533 @@ -4151,7 +15770,17 @@ Index: gcc/cp/pt.c } layout_decl (r, 0); -@@ -14714,7 +14735,20 @@ +@@ -13138,7 +13159,8 @@ + } + else + r = t; +- mark_used (r); ++ if (!mark_used (r, complain) && !(complain & tf_error)) ++ return error_mark_node; + return r; + + case NAMESPACE_DECL: +@@ -14714,7 +14736,20 @@ if (targs) targs = tsubst_template_args (targs, args, complain, in_decl); @@ -4172,7 +15801,16 @@ Index: gcc/cp/pt.c if (TREE_CODE (templ) == COMPONENT_REF) { object = TREE_OPERAND (templ, 0); -@@ -16112,6 +16146,8 @@ +@@ -15826,6 +15861,8 @@ + + LAMBDA_EXPR_THIS_CAPTURE (r) = NULL_TREE; + ++ insert_pending_capture_proxies (); ++ + RETURN (build_lambda_object (r)); + } + +@@ -16112,6 +16149,8 @@ /* The DECL_TI_TEMPLATE should always be the immediate parent template, not the most general template. */ DECL_TI_TEMPLATE (fndecl) = tmpl; @@ -4193,6 +15831,20 @@ Index: gcc/cp/semantics.c } else if (scope) { +Index: gcc/cp/decl2.c +=================================================================== +--- a/src/gcc/cp/decl2.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/decl2.c (.../branches/gcc-5-branch) +@@ -1742,6 +1742,9 @@ + tree fnaddr; + unsigned HOST_WIDE_INT idx; + ++ /* It's OK for the vtable to refer to deprecated virtual functions. */ ++ warning_sentinel w(warn_deprecated_decl); ++ + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (DECL_INITIAL (decl)), + idx, fnaddr) + { Index: gcc/cp/parser.c =================================================================== --- a/src/gcc/cp/parser.c (.../tags/gcc_5_2_0_release) @@ -4207,6 +15859,20 @@ Index: gcc/cp/parser.c cp_parser_skip_to_end_of_statement (parser); return expr; +Index: gcc/cp/cvt.c +=================================================================== +--- a/src/gcc/cp/cvt.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/cvt.c (.../branches/gcc-5-branch) +@@ -695,7 +695,8 @@ + } + + /* FIXME remove when moving to c_fully_fold model. */ +- e = scalar_constant_value (e); ++ if (!CLASS_TYPE_P (type)) ++ e = scalar_constant_value (e); + if (error_operand_p (e)) + return error_mark_node; + Index: gcc/cp/mangle.c =================================================================== --- a/src/gcc/cp/mangle.c (.../tags/gcc_5_2_0_release) @@ -4243,6 +15909,19 @@ Index: gcc/cp/cp-tree.h extern tree finish_increment_expr (tree, enum tree_code); extern tree finish_this_expr (void); extern tree finish_pseudo_destructor_expr (tree, tree, tree, location_t); +Index: gcc/cp/search.c +=================================================================== +--- a/src/gcc/cp/search.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/cp/search.c (.../branches/gcc-5-branch) +@@ -736,7 +736,7 @@ + Here DERIVED is a possible P, DECL is m and BINFO_TYPE (binfo) is N. */ + + /* If DERIVED isn't derived from N, then it can't be a P. */ +- if (!DERIVED_FROM_P (BINFO_TYPE (binfo), derived)) ++ if (!DERIVED_FROM_P (context_for_name_lookup (decl), derived)) + return 0; + + access = access_in_type (derived, decl); Index: gcc/lto-cgraph.c =================================================================== --- a/src/gcc/lto-cgraph.c (.../tags/gcc_5_2_0_release) @@ -4273,6 +15952,19 @@ Index: gcc/lto-cgraph.c } } +Index: gcc/tree-ssa-math-opts.c +=================================================================== +--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-5-branch) +@@ -1856,7 +1856,7 @@ + the same base (array, structure, ...). */ + if (gimple_assign_rhs1 (source_stmt1) != gimple_assign_rhs1 (source_stmt2)) + { +- int64_t inc; ++ uint64_t inc; + HOST_WIDE_INT start_sub, end_sub, end1, end2, end; + struct symbolic_number *toinc_n_ptr, *n_end; + Index: gcc/lra-lives.c =================================================================== --- a/src/gcc/lra-lives.c (.../tags/gcc_5_2_0_release) @@ -5037,6 +16729,59 @@ Index: gcc/function.c } static void +Index: gcc/stor-layout.c +=================================================================== +--- a/src/gcc/stor-layout.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/stor-layout.c (.../branches/gcc-5-branch) +@@ -1831,9 +1831,13 @@ + { + TYPE_SIZE (variant) = size; + TYPE_SIZE_UNIT (variant) = size_unit; +- TYPE_ALIGN (variant) = align; ++ unsigned valign = align; ++ if (TYPE_USER_ALIGN (variant)) ++ valign = MAX (valign, TYPE_ALIGN (variant)); ++ else ++ TYPE_USER_ALIGN (variant) = user_align; ++ TYPE_ALIGN (variant) = valign; + TYPE_PRECISION (variant) = precision; +- TYPE_USER_ALIGN (variant) = user_align; + SET_TYPE_MODE (variant, mode); + } + } +@@ -2154,6 +2158,10 @@ + if (type == error_mark_node) + return; + ++ /* We don't want finalize_type_size to copy an alignment attribute to ++ variants that don't have it. */ ++ type = TYPE_MAIN_VARIANT (type); ++ + /* Do nothing if type has been laid out before. */ + if (TYPE_SIZE (type)) + return; +@@ -2350,13 +2358,17 @@ + /* Now round the alignment and size, + using machine-dependent criteria if any. */ + ++ unsigned align = TYPE_ALIGN (element); ++ if (TYPE_USER_ALIGN (type)) ++ align = MAX (align, TYPE_ALIGN (type)); ++ else ++ TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (element); + #ifdef ROUND_TYPE_ALIGN +- TYPE_ALIGN (type) +- = ROUND_TYPE_ALIGN (type, TYPE_ALIGN (element), BITS_PER_UNIT); ++ align = ROUND_TYPE_ALIGN (type, align, BITS_PER_UNIT); + #else +- TYPE_ALIGN (type) = MAX (TYPE_ALIGN (element), BITS_PER_UNIT); ++ align = MAX (align, BITS_PER_UNIT); + #endif +- TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (element); ++ TYPE_ALIGN (type) = align; + SET_TYPE_MODE (type, BLKmode); + if (TYPE_SIZE (type) != 0 + && ! targetm.member_type_forces_blk (type, VOIDmode) Index: gcc/genmatch.c =================================================================== --- a/src/gcc/genmatch.c (.../tags/gcc_5_2_0_release) @@ -108493,7 +120238,11 @@ Index: gcc/po/ChangeLog =================================================================== --- a/src/gcc/po/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/gcc/po/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,14 @@ +@@ -1,3 +1,18 @@ ++2015-08-17 Joseph Myers <joseph@codesourcery.com> ++ ++ * da.po: Update. ++ +2015-07-31 Joseph Myers <joseph@codesourcery.com> + + * sv.po: Update. @@ -214346,16 +226095,45 @@ Index: gcc/po/da.po =================================================================== --- a/src/gcc/po/da.po (.../tags/gcc_5_2_0_release) +++ b/src/gcc/po/da.po (.../branches/gcc-5-branch) -@@ -132,7 +132,7 @@ +@@ -32,6 +32,7 @@ + # dereference -> følge + # discard -> fjerne + # discard -> kassere ++# divide -> division + # driver -> styringsprogram + # duplicate -> optræder mere end én gang; mangfoldiggøre + # edge list -> kantliste +@@ -80,6 +81,7 @@ + # null pointer -> nul[-]henvisning + # offset -> forskydning + # opcodes (til ovenstående) -> instruktioner ++# option -> tilvalg + # out of range -> uden for det gyldige (til tider mulige) interval + # overflow -> (til tider) løber over + # overlap -> [interval]sammenfald +@@ -96,6 +98,7 @@ + # scope -> virkningsfelt + # shadowing -> skygger for + # shift -> skift ++# slice -> skive (NB UAFKLARET, BEDRE FORSLAG?) + # specified -> (oftest) angivet + # specifier -> anvisning, angivelse + # stab -> stik (?) +@@ -130,10 +133,10 @@ + # + msgid "" msgstr "" - "Project-Id-Version: gcc 5.1.0\n" +-"Project-Id-Version: gcc 5.1.0\n" ++"Project-Id-Version: gcc 5.2.0\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" -"POT-Creation-Date: 2015-04-13 20:12+0000\n" +-"PO-Revision-Date: 2015-04-29 18:00+0200\n" +"POT-Creation-Date: 2015-07-02 12:31+0000\n" - "PO-Revision-Date: 2015-04-29 18:00+0200\n" ++"PO-Revision-Date: 2015-08-16 18:00+0200\n" "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" -@@ -318,13 +318,13 @@ + "Language: da\n" +@@ -318,13 +321,13 @@ #. TARGET_PRINT_OPERAND must handle them. #. We can't handle floating point constants; #. PRINT_OPERAND must handle them. @@ -214371,6 +226149,34 @@ Index: gcc/po/da.po #: config/pdp11/pdp11.c:1768 #, c-format msgid "invalid expression as operand" +@@ -477,14 +480,12 @@ + msgstr " -print-multi-os-directory Vis den relative sti for OS-biblioteker\n" + + #: gcc.c:3197 +-#, fuzzy +-#| msgid " -dumpmachine Display the compiler's target processor\n" + msgid " -print-sysroot Display the target libraries directory\n" +-msgstr " -dumpmachine Vis oversætterens målprocessor\n" ++msgstr " -print-sysroot Vis mappen for målets biblioteker\n" + + #: gcc.c:3198 + msgid " -print-sysroot-headers-suffix Display the sysroot suffix used to find headers\n" +-msgstr "" ++msgstr " -print-sysroot-headers-suffix Vis sysroot-suffikset brugt til at finde teksthoveder\n" + + #: gcc.c:3199 + msgid " -Wa,<options> Pass comma-separated <options> on to the assembler\n" +@@ -499,9 +500,8 @@ + msgstr " -Wl,<tilvalg> Videregiv komma-adskilte <tilvalg> til sammenkæderen\n" + + #: gcc.c:3202 +-#, fuzzy + msgid " -Xassembler <arg> Pass <arg> on to the assembler\n" +-msgstr " -Xlinker <para> Videregiv <para> til sammenkæderen\n" ++msgstr " -Xassembler <para> Videregiv <para> til maskinkodeoversætteren\n" + + #: gcc.c:3203 + msgid " -Xpreprocessor <arg> Pass <arg> on to the preprocessor\n" @@ -1533,7 +1533,7 @@ msgid "options enabled: " msgstr "tilvalg slået til: " @@ -215531,7 +227337,19 @@ Index: gcc/po/da.po #, fuzzy, c-format msgid "missing filename after %qs" msgstr "et filnavn mangler efter '-%s'" -@@ -8602,48 +8604,52 @@ +@@ -8084,10 +8086,8 @@ + msgstr "Udsend kaldegrafinfo" + + #: config/mcore/mcore.opt:43 +-#, fuzzy +-#| msgid "Do not use the divide instruction" + msgid "Use the divide instruction" +-msgstr "Benyt ikke divisionsinstruktionen" ++msgstr "Benyt divisionsinstruktionen" + + #: config/mcore/mcore.opt:47 + msgid "Inline constants if it can be done in 2 insns or less" +@@ -8602,48 +8602,52 @@ msgid "Workaround for ARM Cortex-A53 Erratum number 835769" msgstr "" @@ -215594,7 +227412,16 @@ Index: gcc/po/da.po msgid "Known AArch64 ABIs (for use with the -mabi= option):" msgstr "" -@@ -9832,10 +9838,16 @@ +@@ -9810,7 +9814,7 @@ + + #: config/i386/i386.opt:844 + msgid "Expand 32bit/64bit integer divide into 8bit unsigned integer divide with run-time check" +-msgstr "" ++msgstr "Udvid 32-bit/64-bit heltalsdivision til 8-bit ej underskrevet heltalsdivision med kørselstidskontrol" + + #: config/i386/i386.opt:848 + msgid "Split 32-byte AVX unaligned load" +@@ -9832,10 +9836,16 @@ msgstr "Ikke-understøttet; påvirker kodegenerering af tabeller" #: config/i386/i386.opt:864 @@ -215612,7 +227439,7 @@ Index: gcc/po/da.po msgid "Known stack protector guard (for use with the -mstack-protector-guard= option):" msgstr "" -@@ -10240,7 +10252,7 @@ +@@ -10240,7 +10250,7 @@ msgstr "" #: config/avr/avr.opt:100 @@ -215621,7 +227448,7 @@ Index: gcc/po/da.po msgstr "" #: config/m32r/m32r.opt:34 -@@ -10409,7 +10421,7 @@ +@@ -10409,7 +10419,7 @@ msgid "Set the branch costs for conditional branch instructions. Reasonable" msgstr "" @@ -215630,7 +227457,7 @@ Index: gcc/po/da.po #: config/mips/mips.opt:389 #, fuzzy #| msgid "Use ROM instead of RAM" -@@ -10548,7 +10560,7 @@ +@@ -10548,7 +10558,7 @@ msgid "Permit scheduling of a function's prologue sequence" msgstr "Benyt stubbe til funktionsindledninger" @@ -215639,9 +227466,86 @@ Index: gcc/po/da.po msgid "Do not load the PIC register in function prologues" msgstr "Indlæs ikke PIC-registeret i funktionsbegyndelser" -@@ -10907,350 +10919,350 @@ +@@ -10752,10 +10762,8 @@ + msgstr "Benyt faciliteter fra og planlæg koden til en given processor" + + #: config/sparc/sparc.opt:199 +-#, fuzzy +-#| msgid "Use given SPARC code model" + msgid "Use given SPARC-V9 code model" +-msgstr "Benyt given SPARC-kodemodel" ++msgstr "Benyt given SPARC-V9-kodemodel" + + #: config/sparc/sparc.opt:203 + msgid "Enable debug output" +@@ -10778,18 +10786,16 @@ + msgstr "" + + #: config/rs6000/darwin.opt:38 config/rs6000/sysv4.opt:141 +-#, fuzzy + msgid "Generate 64-bit code" +-msgstr "Generér 64 bit x86-64-kode" ++msgstr "Opret 64-bit kode" + + #: config/rs6000/darwin.opt:42 config/rs6000/sysv4.opt:145 +-#, fuzzy + msgid "Generate 32-bit code" +-msgstr "Generér 64 bit i386-kode" ++msgstr "Opret 32-bit kode" + + #: config/rs6000/rs6000-tables.opt:24 + msgid "Known CPUs (for use with the -mcpu= and -mtune= options):" +-msgstr "" ++msgstr "Kendte cpu'er (for brug med tilvalgene -mcpu= og -mtune=):" + + #: config/rs6000/476.opt:24 + msgid "Preserve the PowerPC 476's link stack by matching up a blr with the bcl/bl insns used for GOT accesses" +@@ -10804,10 +10810,8 @@ + msgstr "Oversæt for 32 bit-henvisninger" + + #: config/rs6000/aix64.opt:32 config/rs6000/linux64.opt:28 +-#, fuzzy +-#| msgid "Use given SPARC code model" + msgid "Select code model" +-msgstr "Benyt given SPARC-kodemodel" ++msgstr "Vælg kodemodel" + + #: config/rs6000/aix64.opt:49 + msgid "Support message passing with the Parallel Environment" +@@ -10831,21 +10835,16 @@ + msgstr "Benyt valgfrie instruktioner fra PowerPC Graphics-gruppen" + + #: config/rs6000/rs6000.opt:121 +-#, fuzzy + msgid "Use PowerPC V2.01 single field mfcr instruction" +-msgstr "Generér char-instruktioner" ++msgstr "Benyt PowerPC V2.01-enkeltfelt mfcr-instruktion" + + #: config/rs6000/rs6000.opt:125 +-#, fuzzy +-#| msgid "Use PowerPC instruction set" + msgid "Use PowerPC V2.02 popcntb instruction" +-msgstr "Benyt PowerPC-instruktionssættet" ++msgstr "Benyt PowerPC V2.02 popcntb-instruktion" + + #: config/rs6000/rs6000.opt:129 +-#, fuzzy +-#| msgid "Use hardware floating point instructions" + msgid "Use PowerPC V2.02 floating point rounding instructions" +-msgstr "Benyt hardware-kommatalsinstruktioner" ++msgstr "Benyt PowerPC V2.02-kommatalsafrundingsinstruktioner" + + #: config/rs6000/rs6000.opt:133 + msgid "Use PowerPC V2.05 compare bytes instruction" +@@ -10902,355 +10901,347 @@ + msgstr "" + + #: config/rs6000/rs6000.opt:193 +-#, fuzzy +-#| msgid "Use AltiVec instructions" msgid "Use vector/scalar (VSX) instructions" - msgstr "Benyt AltiVec-instruktioner" +-msgstr "Benyt AltiVec-instruktioner" ++msgstr "Benyt vektor/skalar-instruktioner (VSX)" -#: config/rs6000/rs6000.opt:236 +#: config/rs6000/rs6000.opt:240 @@ -215661,17 +227565,19 @@ Index: gcc/po/da.po msgstr "Generér ikke flere indlæsnings-/lagringsinstruktioner" -#: config/rs6000/rs6000.opt:252 +-#, fuzzy +-#| msgid "`__builtin_next_arg' called without an argument" +#: config/rs6000/rs6000.opt:256 - #, fuzzy - #| msgid "`__builtin_next_arg' called without an argument" msgid "Mark __tls_get_addr calls with argument info" - msgstr "`__builtin_next_arg' kaldt uden en parameter" +-msgstr "`__builtin_next_arg' kaldt uden en parameter" ++msgstr "Marker __tls_get_addr-kald med parameterinformation" -#: config/rs6000/rs6000.opt:259 +-#, fuzzy +#: config/rs6000/rs6000.opt:263 - #, fuzzy msgid "Schedule the start and end of the procedure" - msgstr "Planlæg ikke begyndelsen og slutningen af proceduren" +-msgstr "Planlæg ikke begyndelsen og slutningen af proceduren" ++msgstr "Planlæg begyndelsen og slutningen af proceduren" -#: config/rs6000/rs6000.opt:263 +#: config/rs6000/rs6000.opt:267 @@ -215689,10 +227595,11 @@ Index: gcc/po/da.po msgstr "" -#: config/rs6000/rs6000.opt:275 config/rs6000/rs6000.opt:279 +-#, fuzzy +#: config/rs6000/rs6000.opt:279 config/rs6000/rs6000.opt:283 - #, fuzzy msgid "Generate software reciprocal divide and square root for better throughput." - msgstr "Generér indlejrede heltalsdivisioner, optimér for båndbredde" +-msgstr "Generér indlejrede heltalsdivisioner, optimér for båndbredde" ++msgstr "Opret programreciprok division og kvadratrod for bedre båndbredde." -#: config/rs6000/rs6000.opt:283 +#: config/rs6000/rs6000.opt:287 @@ -215700,8 +227607,8 @@ Index: gcc/po/da.po msgstr "" -#: config/rs6000/rs6000.opt:287 +-#, fuzzy +#: config/rs6000/rs6000.opt:291 - #, fuzzy msgid "Do not place floating point constants in TOC" msgstr "Anbring ikke kommatalskonstanter i indholdsfortegnelsen" @@ -215711,8 +227618,8 @@ Index: gcc/po/da.po msgstr "Anbring kommatalskonstanter i indholdsfortegnelsen" -#: config/rs6000/rs6000.opt:295 +-#, fuzzy +#: config/rs6000/rs6000.opt:299 - #, fuzzy msgid "Do not place symbol+offset constants in TOC" msgstr "Anbring ikke symbol+afsæt-konstanter i indholdsfortegnelsen" @@ -215741,12 +227648,14 @@ Index: gcc/po/da.po -#: config/rs6000/rs6000.opt:322 +#: config/rs6000/rs6000.opt:326 msgid "Deprecated option. Use -mno-vrsave instead" - msgstr "" +-msgstr "" ++msgstr "Forældet tilvalg. Brug -mno-vrsave i stedet" -#: config/rs6000/rs6000.opt:326 +#: config/rs6000/rs6000.opt:330 msgid "Deprecated option. Use -mvrsave instead" - msgstr "" +-msgstr "" ++msgstr "Forældet tilvalg. Brug -mvrsave i stedet" -#: config/rs6000/rs6000.opt:330 +#: config/rs6000/rs6000.opt:334 @@ -216065,7 +227974,174 @@ Index: gcc/po/da.po msgid "Analyze and remove doubleword swaps from VSX computations." msgstr "" -@@ -14471,1746 +14483,1746 @@ +@@ -11445,21 +11436,16 @@ + msgstr "" + + #: config/lm32/lm32.opt:24 +-#, fuzzy + msgid "Enable multiply instructions" +-msgstr "Generér sammensatte gang/addér-instruktioner" ++msgstr "Aktiver multiply-instruktioner" + + #: config/lm32/lm32.opt:28 +-#, fuzzy +-#| msgid "Enable parallel instructions" + msgid "Enable divide and modulus instructions" +-msgstr "Aktivér parallelle instruktioner" ++msgstr "Aktiver division- og modulinstruktioner" + + #: config/lm32/lm32.opt:32 +-#, fuzzy +-#| msgid "Enable parallel instructions" + msgid "Enable barrel shift instructions" +-msgstr "Aktivér parallelle instruktioner" ++msgstr "Aktiver barrel shift-instruktioner" + + #: config/lm32/lm32.opt:36 + #, fuzzy +@@ -11505,7 +11491,7 @@ + + #: config/nios2/nios2.opt:47 + msgid "Use table based fast divide (default at -O3)" +-msgstr "" ++msgstr "Benyt tabelbaseret hurtig division (standard på -03)" + + #: config/nios2/nios2.opt:51 + #, fuzzy +@@ -11820,10 +11806,8 @@ + msgstr "" + + #: config/nios2/nios2.opt:322 +-#, fuzzy +-#| msgid "Do not use the divide instruction" + msgid "Do not use the fdivd custom instruction" +-msgstr "Benyt ikke divisionsinstruktionen" ++msgstr "Benyt ikke den fdivd-tilpassede instruktion" + + #: config/nios2/nios2.opt:326 + msgid "Integer id (N) of fdivd custom instruction" +@@ -12257,26 +12241,20 @@ + msgstr "Benyt faciliteter fra og planlæg koden til en given processor" + + #: config/microblaze/microblaze.opt:56 +-#, fuzzy +-#| msgid "Don't optimize block moves" + msgid "Don't optimize block moves, use memcpy" +-msgstr "Optimér ikke blokflytninger" ++msgstr "Optimer ikke blokflytninger, brug memcpy" + + #: config/microblaze/microblaze.opt:68 +-#, fuzzy +-#| msgid "Use data cache for volatile mem refs (default)" + msgid "Use the soft multiply emulation (default)" +-msgstr "Benyt datamellemlager for volatile hukommelsesreferencer (standard)" ++msgstr "Benyt den bløde multiply-emulering (standard)" + + #: config/microblaze/microblaze.opt:72 + msgid "Use reorder instructions (swap and byte reversed load/store) (default)" +-msgstr "" ++msgstr "Benyt instruktioner for ny rækkefølge (swap og byte vendt om indlæs/lager) (standard)" + + #: config/microblaze/microblaze.opt:76 +-#, fuzzy +-#| msgid "Use data cache for volatile mem refs (default)" + msgid "Use the software emulation for divides (default)" +-msgstr "Benyt datamellemlager for volatile hukommelsesreferencer (standard)" ++msgstr "Benyt programemuleringen for divisioner (standard)" + + #: config/microblaze/microblaze.opt:80 + #, fuzzy +@@ -13192,10 +13170,8 @@ + msgstr "" + + #: config/mep/mep.opt:78 +-#, fuzzy +-#| msgid "Do not use the divide instruction" + msgid "Enable 32-bit divide instructions" +-msgstr "Benyt ikke divisionsinstruktionen" ++msgstr "Aktiver 32-bit divisionsinstruktioner" + + #: config/mep/mep.opt:93 + msgid "__io vars are volatile by default" +@@ -13206,10 +13182,8 @@ + msgstr "" + + #: config/mep/mep.opt:101 +-#, fuzzy +-#| msgid "Enable parallel instructions" + msgid "Enable leading zero instructions" +-msgstr "Aktivér parallelle instruktioner" ++msgstr "Aktiver foranstaillede zero-instruktioner" + + #: config/mep/mep.opt:108 + #, fuzzy +@@ -13334,10 +13308,8 @@ + msgstr "Forårsag ikke undtagelse ved heltalsdivision med nul" + + #: config/mips/mips.opt:112 +-#, fuzzy +-#| msgid "Enable use of DB instruction" + msgid "Allow the use of MDMX instructions" +-msgstr "Aktivér brug af DB-instruktioner" ++msgstr "Tillade brugen af MDMX-instruktioner" + + #: config/mips/mips.opt:116 + msgid "Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations" +@@ -13344,22 +13316,16 @@ + msgstr "" + + #: config/mips/mips.opt:120 +-#, fuzzy +-#| msgid "Don't use MIPS16 instructions" + msgid "Use MIPS-DSP instructions" +-msgstr "Benyt ikke MIPS16-instruktioner" ++msgstr "Benyt MIPS-DSP-instruktioner" + + #: config/mips/mips.opt:124 +-#, fuzzy +-#| msgid "Use POWER2 instruction set" + msgid "Use MIPS-DSP REV 2 instructions" +-msgstr "Benyt POWER2-instruktionssættet" ++msgstr "Benyt MIPS-DSP REV 2-instruktioner" + + #: config/mips/mips.opt:146 +-#, fuzzy +-#| msgid "Use the bit-field instructions" + msgid "Use Enhanced Virtual Addressing instructions" +-msgstr "Benyt bitfeltinstruktionerne" ++msgstr "Benyt Enhanced Virtual Addressing-instruktioner" + + #: config/mips/mips.opt:150 + msgid "Use NewABI-style %reloc() assembly operators" +@@ -13367,7 +13333,7 @@ + + #: config/mips/mips.opt:154 + msgid "Use -G for data that is not defined by the current object" +-msgstr "" ++msgstr "Benyt -G for data som ikke er defineret af det nuværende objekt" + + #: config/mips/mips.opt:158 + msgid "Work around certain 24K errata" +@@ -13374,16 +13340,12 @@ + msgstr "" + + #: config/mips/mips.opt:162 +-#, fuzzy +-#| msgid "Work around early 4300 hardware bug" + msgid "Work around certain R4000 errata" +-msgstr "Arbejd rundt om tidlig 4300-hardwarefejl" ++msgstr "Arbejd rundt om bestemte R4000-fejl" + + #: config/mips/mips.opt:166 +-#, fuzzy +-#| msgid "Work around early 4300 hardware bug" + msgid "Work around certain R4400 errata" +-msgstr "Arbejd rundt om tidlig 4300-hardwarefejl" ++msgstr "Arbejd rundt om bestemte R4400-fejl" + + #: config/mips/mips.opt:170 + msgid "Work around certain RM7000 errata" +@@ -14471,1761 +14433,1737 @@ msgid "-dumpdir <dir>\tSet the directory name to be used for dumps" msgstr " -dumpbase <fil> Basisnavn til brug for dump fra specifikke faser\n" @@ -217348,7 +229424,8 @@ Index: gcc/po/da.po -#: common.opt:1997 +#: common.opt:2000 msgid "Enable the group heuristic in the scheduler" - msgstr "" +-msgstr "" ++msgstr "Aktiver gruppeheuristikken i planlæggeren" -#: common.opt:2001 +#: common.opt:2004 @@ -217516,13 +229593,15 @@ Index: gcc/po/da.po -#: common.opt:2141 +#: common.opt:2144 msgid "Check for syntax errors, then stop" - msgstr "Kontrollér syntaks og stop derefter" +-msgstr "Kontrollér syntaks og stop derefter" ++msgstr "Kontroller for syntaksfejl og stop derefter" -#: common.opt:2145 +-#, fuzzy +#: common.opt:2148 - #, fuzzy msgid "Create data files needed by \"gcov\"" - msgstr "Opret datafiler som gcov har brug for" +-msgstr "Opret datafiler som gcov har brug for" ++msgstr "Opret datafiler som »gcov« har brug for" -#: common.opt:2149 +#: common.opt:2152 @@ -217530,10 +229609,11 @@ Index: gcc/po/da.po msgstr "Udfør springtrådningsoptimeringer" -#: common.opt:2153 +-#, fuzzy +#: common.opt:2156 - #, fuzzy msgid "Report the time taken by each compiler pass" - msgstr "Rapportér den tid det tager for hver oversættelsesfase ved afslutningen af kørslen" +-msgstr "Rapportér den tid det tager for hver oversættelsesfase ved afslutningen af kørslen" ++msgstr "Rapporter den tid det tager for hvert kompilergennemløb" -#: common.opt:2157 +#: common.opt:2160 @@ -217542,10 +229622,12 @@ Index: gcc/po/da.po msgstr " -ftls-model=[global-dynamic | local-dynamic | initial-exec | local-exec] Indikerer den forvalgte tråd-lokale lagringsmodel for kodegenerering\n" -#: common.opt:2160 +-#, fuzzy, c-format +#: common.opt:2163 - #, fuzzy, c-format ++#, c-format msgid "unknown TLS model %qs" - msgstr "'%s': ukendt tls-model-tilvalg" +-msgstr "'%s': ukendt tls-model-tilvalg" ++msgstr "ukendt tls-model %qs" -#: common.opt:2176 +#: common.opt:2179 @@ -217577,11 +229659,12 @@ Index: gcc/po/da.po msgstr "Aktivér SSA-optimeringer" -#: common.opt:2199 +-#, fuzzy +-#| msgid "Enable SSA optimizations" +#: common.opt:2202 - #, fuzzy - #| msgid "Enable SSA optimizations" msgid "Enable SSA-BIT-CCP optimization on trees" - msgstr "Aktivér SSA-optimeringer" +-msgstr "Aktivér SSA-optimeringer" ++msgstr "Aktiver SSA-BIT-CCP-optimering på træer" -#: common.opt:2207 +#: common.opt:2210 @@ -217752,11 +229835,12 @@ Index: gcc/po/da.po msgstr "" -#: common.opt:2332 +-#, fuzzy +-#| msgid "Enable SSA optimizations" +#: common.opt:2335 - #, fuzzy - #| msgid "Enable SSA optimizations" msgid "Enable SSA code sinking on trees" - msgstr "Aktivér SSA-optimeringer" +-msgstr "Aktivér SSA-optimeringer" ++msgstr "Aktiver SSA-kodesinking på træer" -#: common.opt:2336 +#: common.opt:2339 @@ -217930,10 +230014,12 @@ Index: gcc/po/da.po msgstr "" -#: common.opt:2507 +-#, fuzzy, c-format +#: common.opt:2510 - #, fuzzy, c-format ++#, c-format msgid "unrecognized visibility value %qs" - msgstr "ukendt registernavn '%s'" +-msgstr "ukendt registernavn '%s'" ++msgstr "ikke genkendt synlighedsværdi %qs" -#: common.opt:2523 +#: common.opt:2526 @@ -218031,12 +230117,14 @@ Index: gcc/po/da.po -#: common.opt:2595 +#: common.opt:2598 msgid "Generate DWARF pubnames and pubtypes sections." - msgstr "" +-msgstr "" ++msgstr "Opret sektioner for DWARF-pubnavne og pubtyper." -#: common.opt:2599 +#: common.opt:2602 msgid "Generate DWARF pubnames and pubtypes sections with GNU extensions." - msgstr "" +-msgstr "" ++msgstr "Opret sektioner for DWARF-pubnavne og pubtyper med GNU-udvidelser." -#: common.opt:2603 +#: common.opt:2606 @@ -218049,28 +230137,32 @@ Index: gcc/po/da.po msgstr "" -#: common.opt:2611 +-#, fuzzy +#: common.opt:2614 - #, fuzzy msgid "Don't generate debug information in separate .dwo files" - msgstr "Generér fejlfindingsinfo i standardformat" +-msgstr "Generér fejlfindingsinfo i standardformat" ++msgstr "Opret ikek fejlsøgningsinformation i separate .dwo-filer" -#: common.opt:2615 +-#, fuzzy +#: common.opt:2618 - #, fuzzy msgid "Generate debug information in separate .dwo files" - msgstr "Generér fejlfindingsinfo i standardformat" +-msgstr "Generér fejlfindingsinfo i standardformat" ++msgstr "Opret fejlsøgningsinformation i separate .dwo-filer" -#: common.opt:2619 +-#, fuzzy +#: common.opt:2622 - #, fuzzy msgid "Generate debug information in STABS format" - msgstr "Generér fejlfindingsinfo i standardformat" +-msgstr "Generér fejlfindingsinfo i standardformat" ++msgstr "Opret fejlsøgningsinformation i STABS-format" -#: common.opt:2623 +-#, fuzzy +#: common.opt:2626 - #, fuzzy msgid "Generate debug information in extended STABS format" - msgstr "Generér fejlfindingsinfo i udvidet standardformat" +-msgstr "Generér fejlfindingsinfo i udvidet standardformat" ++msgstr "Opret fejlsøgningsinformation i udvidet STABS-format" -#: common.opt:2627 +#: common.opt:2630 @@ -218089,29 +230181,33 @@ Index: gcc/po/da.po msgstr "Generér fejlfindingsinfo i standardformat" -#: common.opt:2639 +-#, fuzzy +#: common.opt:2642 - #, fuzzy msgid "Generate debug information in VMS format" - msgstr "Generér fejlfindingsinfo i standardformat" +-msgstr "Generér fejlfindingsinfo i standardformat" ++msgstr "Opret fejlsøgningsinformation i VMS-format" -#: common.opt:2643 +-#, fuzzy +#: common.opt:2646 - #, fuzzy msgid "Generate debug information in XCOFF format" - msgstr "Generér fejlfindingsinfo i standardformat" +-msgstr "Generér fejlfindingsinfo i standardformat" ++msgstr "Opret fejlsøgningsinformation i XCOFF-format" -#: common.opt:2647 +-#, fuzzy +#: common.opt:2650 - #, fuzzy msgid "Generate debug information in extended XCOFF format" - msgstr "Generér fejlfindingsinfo i udvidet standardformat" +-msgstr "Generér fejlfindingsinfo i udvidet standardformat" ++msgstr "Opret fejlsøgningsinformation i udvidet XCOFF-format" -#: common.opt:2665 +-#, fuzzy +-#| msgid "Generate char instructions" +#: common.opt:2668 - #, fuzzy - #| msgid "Generate char instructions" msgid "Generate compressed debug sections" - msgstr "Generér char-instruktioner" +-msgstr "Generér char-instruktioner" ++msgstr "Opret komprimeret fejlsøgningssektioner" -#: common.opt:2669 +#: common.opt:2672 @@ -218147,40 +230243,46 @@ Index: gcc/po/da.po msgstr "" -#: common.opt:2756 +-#, fuzzy +#: common.opt:2759 - #, fuzzy msgid "Do not display functions compiled or elapsed time" - msgstr " -quiet Vis ikke funktioner der oversættes eller forløbet tid\n" +-msgstr " -quiet Vis ikke funktioner der oversættes eller forløbet tid\n" ++msgstr "Vis ikke funktioner der oversættes eller forløbet tid" -#: common.opt:2788 +-#, fuzzy +#: common.opt:2791 - #, fuzzy msgid "Enable verbose output" - msgstr "Aktivér fejlanalyseringsuddata" +-msgstr "Aktivér fejlanalyseringsuddata" ++msgstr "Aktiver uddybende uddata" -#: common.opt:2792 +-#, fuzzy +-#| msgid " -version Display the compiler's version\n" +#: common.opt:2795 - #, fuzzy - #| msgid " -version Display the compiler's version\n" msgid "Display the compiler's version" - msgstr " -version Udskriv oversætterens version\n" +-msgstr " -version Udskriv oversætterens version\n" ++msgstr "Vis oversætterens version" -#: common.opt:2796 +-#, fuzzy +#: common.opt:2799 - #, fuzzy msgid "Suppress warnings" - msgstr "%s: advarsel: " +-msgstr "%s: advarsel: " ++msgstr "Undertryk advarsler" -#: common.opt:2806 +#: common.opt:2809 msgid "Create a shared library" - msgstr "" +-msgstr "" ++msgstr "Opret et delt bibliotek" -#: common.opt:2851 +-#, fuzzy +#: common.opt:2854 - #, fuzzy msgid "Create a position independent executable" - msgstr "Generér placeringsuafhængig kode, om muligt" +-msgstr "Generér placeringsuafhængig kode, om muligt" ++msgstr "Opret en placeringsuafhængig kørbar fil" -#: common.opt:2858 +#: common.opt:2861 @@ -218189,28 +230291,65 @@ Index: gcc/po/da.po -#: go/gofrontend/expressions.cc:93 c-family/c-common.c:1910 cp/cvt.c:1170 -#: cp/cvt.c:1418 +-#, fuzzy, gcc-internal-format +-#| msgid "%Hvalue computed is not used" +#: go/gofrontend/expressions.cc:93 c-family/c-common.c:1910 cp/cvt.c:1182 +#: cp/cvt.c:1430 - #, fuzzy, gcc-internal-format - #| msgid "%Hvalue computed is not used" ++#, gcc-internal-format msgid "value computed is not used" -@@ -16247,297 +16259,297 @@ +-msgstr "%Hberegnet værdi benyttes ikke" ++msgstr "beregnet værdi benyttes ikke" + + #: go/gofrontend/expressions.cc:628 +-#, fuzzy +-#| msgid "invalid use of `::'" + msgid "invalid use of type" +-msgstr "ugyldig brug af '::'" ++msgstr "ugyldig brug af type" + + #: go/gofrontend/expressions.cc:2725 go/gofrontend/expressions.cc:2791 + #: go/gofrontend/expressions.cc:2807 + msgid "constant refers to itself" +-msgstr "" ++msgstr "konstant har reference til sig selv" + + #: go/gofrontend/expressions.cc:3704 go/gofrontend/expressions.cc:4082 + #, fuzzy +@@ -16234,310 +16172,250 @@ + msgstr "uventet operand" + + #: go/gofrontend/expressions.cc:4049 +-#, fuzzy + msgid "expected numeric type" +-msgstr "uventet operand" ++msgstr "forventet numerisk type" + + #: go/gofrontend/expressions.cc:4054 +-#, fuzzy + msgid "expected boolean type" +-msgstr "uventet operand" ++msgstr "forventet boolesk type" + + #: go/gofrontend/expressions.cc:4060 msgid "expected integer or boolean type" - msgstr "" +-msgstr "" ++msgstr "forventet heltal eller boolesk type" -#: go/gofrontend/expressions.cc:5563 +-#, fuzzy +-#| msgid "comparison of promoted ~unsigned with unsigned" +#: go/gofrontend/expressions.cc:5565 - #, fuzzy - #| msgid "comparison of promoted ~unsigned with unsigned" msgid "invalid comparison of nil with nil" - msgstr "sammenligning af forfremmet ~unsigned med unsigned" +-msgstr "sammenligning af forfremmet ~unsigned med unsigned" ++msgstr "ugyldig sammenligning af nil med nil" -#: go/gofrontend/expressions.cc:5569 go/gofrontend/expressions.cc:5587 +-#, fuzzy +-#| msgid "incompatible types in %s" +#: go/gofrontend/expressions.cc:5571 go/gofrontend/expressions.cc:5589 - #, fuzzy - #| msgid "incompatible types in %s" msgid "incompatible types in binary expression" - msgstr "uforenelige typer i %s" +-msgstr "uforenelige typer i %s" ++msgstr "uforenelige typer i binæret udtryk" -#: go/gofrontend/expressions.cc:5607 +#: go/gofrontend/expressions.cc:5609 @@ -218253,18 +230392,20 @@ Index: gcc/po/da.po msgstr "typeomtvingelse passer ikke til funktionstype" -#: go/gofrontend/expressions.cc:6775 +-#, fuzzy +-#| msgid "invalid use of `this' in non-member function" +#: go/gofrontend/expressions.cc:6777 - #, fuzzy - #| msgid "invalid use of `this' in non-member function" msgid "invalid use of %<...%> with builtin function" - msgstr "ugyldig brug af 'this' i ikke-medlemsfunktion" +-msgstr "ugyldig brug af 'this' i ikke-medlemsfunktion" ++msgstr "ugyldig brug af %<...%> med indbygget funktion" -#: go/gofrontend/expressions.cc:6786 +-#, fuzzy +-#| msgid "invalid type argument of `%s'" +#: go/gofrontend/expressions.cc:6788 - #, fuzzy - #| msgid "invalid type argument of `%s'" msgid "invalid use of method value as argument of Offsetof" - msgstr "ugyldig typeparameter '%s'" +-msgstr "ugyldig typeparameter '%s'" ++msgstr "ugyldig brug af metodeværdi som argument for Offsetof" -#: go/gofrontend/expressions.cc:6800 +#: go/gofrontend/expressions.cc:6802 @@ -218276,15 +230417,16 @@ Index: gcc/po/da.po -#: go/gofrontend/expressions.cc:7951 go/gofrontend/expressions.cc:7997 -#: go/gofrontend/expressions.cc:8056 go/gofrontend/expressions.cc:9208 -#: go/gofrontend/expressions.cc:9225 go/gofrontend/expressions.cc:9241 +-#, fuzzy +-#| msgid "no arguments" +#: go/gofrontend/expressions.cc:6827 go/gofrontend/expressions.cc:6888 +#: go/gofrontend/expressions.cc:6990 go/gofrontend/expressions.cc:7804 +#: go/gofrontend/expressions.cc:7953 go/gofrontend/expressions.cc:7999 +#: go/gofrontend/expressions.cc:8058 go/gofrontend/expressions.cc:9210 +#: go/gofrontend/expressions.cc:9227 go/gofrontend/expressions.cc:9243 - #, fuzzy - #| msgid "no arguments" msgid "not enough arguments" - msgstr "ingen parametre" +-msgstr "ingen parametre" ++msgstr "ikke nok parametre" -#: go/gofrontend/expressions.cc:6827 go/gofrontend/expressions.cc:6888 -#: go/gofrontend/expressions.cc:7807 go/gofrontend/expressions.cc:7934 @@ -218292,160 +230434,183 @@ Index: gcc/po/da.po -#: go/gofrontend/expressions.cc:8058 go/gofrontend/expressions.cc:8806 -#: go/gofrontend/expressions.cc:9213 go/gofrontend/expressions.cc:9227 -#: go/gofrontend/expressions.cc:9248 +-#, fuzzy +-#| msgid "too many arguments for format" +#: go/gofrontend/expressions.cc:6829 go/gofrontend/expressions.cc:6890 +#: go/gofrontend/expressions.cc:7809 go/gofrontend/expressions.cc:7936 +#: go/gofrontend/expressions.cc:7958 go/gofrontend/expressions.cc:8004 +#: go/gofrontend/expressions.cc:8060 go/gofrontend/expressions.cc:8808 +#: go/gofrontend/expressions.cc:9215 go/gofrontend/expressions.cc:9229 +#: go/gofrontend/expressions.cc:9250 - #, fuzzy - #| msgid "too many arguments for format" msgid "too many arguments" - msgstr "for mange parametre til formatering" +-msgstr "for mange parametre til formatering" ++msgstr "for mange parametre" -#: go/gofrontend/expressions.cc:6890 +-#, fuzzy +-#| msgid "argument 1 must be a 5-bit signed literal" +#: go/gofrontend/expressions.cc:6892 - #, fuzzy - #| msgid "argument 1 must be a 5-bit signed literal" msgid "argument 1 must be a map" - msgstr "1. parameter skal være en 5 bit-konstant med fortegn" +-msgstr "1. parameter skal være en 5 bit-konstant med fortegn" ++msgstr "1. parameter skal være en oversættelse" -#: go/gofrontend/expressions.cc:7014 +-#, fuzzy +-#| msgid "invalid return type for member function `%#D'" +#: go/gofrontend/expressions.cc:7016 - #, fuzzy - #| msgid "invalid return type for member function `%#D'" msgid "invalid type for make function" - msgstr "ugyldig returtype for medlemsfunktionen '%#D'" +-msgstr "ugyldig returtype for medlemsfunktionen '%#D'" ++msgstr "ugyldig type for make-funktion" -#: go/gofrontend/expressions.cc:7030 +#: go/gofrontend/expressions.cc:7032 msgid "length required when allocating a slice" - msgstr "" +-msgstr "" ++msgstr "længde krævet når en skive allokeres" -#: go/gofrontend/expressions.cc:7065 +#: go/gofrontend/expressions.cc:7067 msgid "len larger than cap" - msgstr "" +-msgstr "" ++msgstr "len større end cap" -#: go/gofrontend/expressions.cc:7077 +-#, fuzzy +-#| msgid "too many arguments for format" +#: go/gofrontend/expressions.cc:7079 - #, fuzzy - #| msgid "too many arguments for format" msgid "too many arguments to make" - msgstr "for mange parametre til formatering" +-msgstr "for mange parametre til formatering" ++msgstr "for mange parametre for make" -#: go/gofrontend/expressions.cc:7851 +-#, fuzzy +-#| msgid "argument 1 must be a 5-bit signed literal" +#: go/gofrontend/expressions.cc:7853 - #, fuzzy - #| msgid "argument 1 must be a 5-bit signed literal" msgid "argument must be array or slice or channel" - msgstr "1. parameter skal være en 5 bit-konstant med fortegn" +-msgstr "1. parameter skal være en 5 bit-konstant med fortegn" ++msgstr "parameter skal være en array eller skive eller kanal" -#: go/gofrontend/expressions.cc:7861 +#: go/gofrontend/expressions.cc:7863 msgid "argument must be string or array or slice or map or channel" - msgstr "" +-msgstr "" ++msgstr "parameter skal være streng eller array eller skive eller oversættelse eller kanal" - # shadowing betyder at en funktion har samme navn og dermed skjuler en anden +-# shadowing betyder at en funktion har samme navn og dermed skjuler en anden -#: go/gofrontend/expressions.cc:7907 +-#, fuzzy +-#| msgid "Support 3DNow! built-in functions" +#: go/gofrontend/expressions.cc:7909 - #, fuzzy - #| msgid "Support 3DNow! built-in functions" msgid "unsupported argument type to builtin function" - msgstr "Understøt indbyggede 3DNow!-funktioner" +-msgstr "Understøt indbyggede 3DNow!-funktioner" ++msgstr "ikke understøttet parametertype for indbygget funktion" -#: go/gofrontend/expressions.cc:7918 +-#, fuzzy +-#| msgid "argument 2 must be a 5-bit unsigned literal" +#: go/gofrontend/expressions.cc:7920 - #, fuzzy - #| msgid "argument 2 must be a 5-bit unsigned literal" msgid "argument must be channel" - msgstr "2. parameter skal være en 5 bit-konstant uden fortegn" +-msgstr "2. parameter skal være en 5 bit-konstant uden fortegn" ++msgstr "parameter skal være kanal" -#: go/gofrontend/expressions.cc:7920 +#: go/gofrontend/expressions.cc:7922 msgid "cannot close receive-only channel" - msgstr "" +-msgstr "" ++msgstr "kan ikke lukke modtag-kun kanal" -#: go/gofrontend/expressions.cc:7942 +-#, fuzzy +-#| msgid "argument 1 must be a 5-bit signed literal" +#: go/gofrontend/expressions.cc:7944 - #, fuzzy - #| msgid "argument 1 must be a 5-bit signed literal" msgid "argument must be a field reference" - msgstr "1. parameter skal være en 5 bit-konstant med fortegn" +-msgstr "1. parameter skal være en 5 bit-konstant med fortegn" ++msgstr "parameter skal være en feltreference" -#: go/gofrontend/expressions.cc:7972 +-#, fuzzy +-#| msgid "argument 1 must be a 5-bit signed literal" +#: go/gofrontend/expressions.cc:7974 - #, fuzzy - #| msgid "argument 1 must be a 5-bit signed literal" msgid "left argument must be a slice" - msgstr "1. parameter skal være en 5 bit-konstant med fortegn" +-msgstr "1. parameter skal være en 5 bit-konstant med fortegn" ++msgstr "venstre parameter skal være en skive" -#: go/gofrontend/expressions.cc:7980 +#: go/gofrontend/expressions.cc:7982 msgid "element types must be the same" - msgstr "" +-msgstr "" ++msgstr "elementtyper skal være ens" -#: go/gofrontend/expressions.cc:7985 +-#, fuzzy +#: go/gofrontend/expressions.cc:7987 - #, fuzzy msgid "first argument must be []byte" - msgstr "den første parameter til '%s' skal være 'int'" +-msgstr "den første parameter til '%s' skal være 'int'" ++msgstr "første parameter skal være []byte" -#: go/gofrontend/expressions.cc:7988 +-#, fuzzy +-#| msgid "second token after #line is not a string" +#: go/gofrontend/expressions.cc:7990 - #, fuzzy - #| msgid "second token after #line is not a string" msgid "second argument must be slice or string" - msgstr "det andet symbol efter #line er ikke en streng" +-msgstr "det andet symbol efter #line er ikke en streng" ++msgstr "anden parameter skal være skive eller streng" -#: go/gofrontend/expressions.cc:8032 +-#, fuzzy +-#| msgid "bit-field `%s' has invalid type" +#: go/gofrontend/expressions.cc:8034 - #, fuzzy - #| msgid "bit-field `%s' has invalid type" msgid "argument 2 has invalid type" - msgstr "bitfeltet '%s' er af en ufuldstændig type" +-msgstr "bitfeltet '%s' er af en ufuldstændig type" ++msgstr "parameter 2 har ugyldig type" -#: go/gofrontend/expressions.cc:8048 +-#, fuzzy +-#| msgid "parameter `%s' has incomplete type" +#: go/gofrontend/expressions.cc:8050 - #, fuzzy - #| msgid "parameter `%s' has incomplete type" msgid "argument must have complex type" - msgstr "parameteren '%s' er af en ufuldstændig type" +-msgstr "parameteren '%s' er af en ufuldstændig type" ++msgstr "parameter skal have kompleks type" -#: go/gofrontend/expressions.cc:8066 +-#, fuzzy +-#| msgid "macro names must be identifiers" +#: go/gofrontend/expressions.cc:8068 - #, fuzzy - #| msgid "macro names must be identifiers" msgid "complex arguments must have identical types" - msgstr "makronavne skal være kaldenavne" +-msgstr "makronavne skal være kaldenavne" ++msgstr "komplekse parametre skal have identiske typer" -#: go/gofrontend/expressions.cc:8068 +-#, fuzzy +-#| msgid "Do not use hardware floating point" +#: go/gofrontend/expressions.cc:8070 - #, fuzzy - #| msgid "Do not use hardware floating point" msgid "complex arguments must have floating-point type" - msgstr "Benyt ikke hardware-kommatal" +-msgstr "Benyt ikke hardware-kommatal" ++msgstr "komplekse parametre skal have kommatalstype" -#: go/gofrontend/expressions.cc:8618 go/gofrontend/expressions.cc:9154 -#: go/gofrontend/expressions.cc:9590 +-#, fuzzy +-#| msgid "In function" +#: go/gofrontend/expressions.cc:8620 go/gofrontend/expressions.cc:9156 +#: go/gofrontend/expressions.cc:9592 - #, fuzzy - #| msgid "In function" msgid "expected function" - msgstr "I funktionen" +-msgstr "I funktionen" ++msgstr "forventet funktion" -#: go/gofrontend/expressions.cc:8645 +#: go/gofrontend/expressions.cc:8647 msgid "multiple-value argument in single-value context" - msgstr "" +-msgstr "" ++msgstr "multiple-value parameter i enkel-værdi kontekst" -#: go/gofrontend/expressions.cc:8810 +-#, fuzzy +-#| msgid "invalid use of non-lvalue array" +#: go/gofrontend/expressions.cc:8812 - #, fuzzy - #| msgid "invalid use of non-lvalue array" msgid "invalid use of %<...%> with non-slice" - msgstr "ugyldig brug af en tabel der ikke kan optræde som en venstreværdi" +-msgstr "ugyldig brug af en tabel der ikke kan optræde som en venstreværdi" ++msgstr "ugyldig brug af %<...%> med ikke-skive" -#: go/gofrontend/expressions.cc:9162 +#: go/gofrontend/expressions.cc:9164 @@ -218453,39 +230618,44 @@ Index: gcc/po/da.po msgstr "" -#: go/gofrontend/expressions.cc:9180 +-#, fuzzy +-#| msgid "incompatible types in %s" +#: go/gofrontend/expressions.cc:9182 - #, fuzzy - #| msgid "incompatible types in %s" msgid "incompatible type for receiver" - msgstr "uforenelige typer i %s" +-msgstr "uforenelige typer i %s" ++msgstr "uforenelige typer for modtager" -#: go/gofrontend/expressions.cc:9198 +-#, fuzzy +-#| msgid "invalid use of `this' in non-member function" +#: go/gofrontend/expressions.cc:9200 - #, fuzzy - #| msgid "invalid use of `this' in non-member function" msgid "invalid use of %<...%> calling non-variadic function" - msgstr "ugyldig brug af 'this' i ikke-medlemsfunktion" +-msgstr "ugyldig brug af 'this' i ikke-medlemsfunktion" ++msgstr "ugyldig brug af %<...%> kaldende ikke-variadic funktion" -#: go/gofrontend/expressions.cc:9599 go/gofrontend/expressions.cc:9613 +-#, fuzzy +-#| msgid "number of arguments doesn't match prototype" +#: go/gofrontend/expressions.cc:9601 go/gofrontend/expressions.cc:9615 - #, fuzzy - #| msgid "number of arguments doesn't match prototype" msgid "number of results does not match number of values" - msgstr "antallet af parametre passer ikke til prototypen" +-msgstr "antallet af parametre passer ikke til prototypen" ++msgstr "antallet af resultater matcher ikke antallet af værdier" -#: go/gofrontend/expressions.cc:9969 go/gofrontend/expressions.cc:10481 +-#, fuzzy +-#| msgid "macro names must be identifiers" +#: go/gofrontend/expressions.cc:9971 go/gofrontend/expressions.cc:10483 - #, fuzzy - #| msgid "macro names must be identifiers" msgid "index must be integer" - msgstr "makronavne skal være kaldenavne" +-msgstr "makronavne skal være kaldenavne" ++msgstr "indeks skal være heltal" -#: go/gofrontend/expressions.cc:9977 go/gofrontend/expressions.cc:10489 +-#, fuzzy +-#| msgid "Assume int to be 8 bit integer" +#: go/gofrontend/expressions.cc:9979 go/gofrontend/expressions.cc:10491 - #, fuzzy - #| msgid "Assume int to be 8 bit integer" msgid "slice end must be integer" - msgstr "Antag at int er 8 bit-heltal" +-msgstr "Antag at int er 8 bit-heltal" ++msgstr "skive-slutning skal være heltal" -#: go/gofrontend/expressions.cc:9985 +#: go/gofrontend/expressions.cc:9987 @@ -218517,18 +230687,20 @@ Index: gcc/po/da.po msgstr "" -#: go/gofrontend/expressions.cc:11857 +-#, fuzzy +-#| msgid "too many arguments for format" +#: go/gofrontend/expressions.cc:11859 - #, fuzzy - #| msgid "too many arguments for format" msgid "too many expressions for struct" - msgstr "for mange parametre til formatering" +-msgstr "for mange parametre til formatering" ++msgstr "for mange udtryk for struct" -#: go/gofrontend/expressions.cc:11870 +-#, fuzzy +-#| msgid "too few arguments for format" +#: go/gofrontend/expressions.cc:11872 - #, fuzzy - #| msgid "too few arguments for format" msgid "too few expressions for struct" - msgstr "for få parametre til formatering" +-msgstr "for få parametre til formatering" ++msgstr "for få udtryk for struct" -#: go/gofrontend/expressions.cc:13618 go/gofrontend/statements.cc:1585 +#: go/gofrontend/expressions.cc:13620 go/gofrontend/statements.cc:1585 @@ -218554,7 +230726,7 @@ Index: gcc/po/da.po msgid "invalid receive on send-only channel" msgstr "" -@@ -16667,86 +16679,86 @@ +@@ -16667,86 +16545,86 @@ msgid "cannot use type %s as type %s" msgstr "kan ikke konvertere typen '%T' til typen '%T'" @@ -218658,7 +230830,7 @@ Index: gcc/po/da.po #, c-format msgid "method %s%s%s is marked go:nointerface" msgstr "" -@@ -16880,7 +16892,7 @@ +@@ -16880,7 +16758,7 @@ msgid "invalid third argument to %<__builtin_prefetch%>; using zero" msgstr "ugyldig tredje parameter til '__builtin_prefetch'; benytter nul" @@ -218667,7 +230839,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "too many arguments to function `va_start'" msgid "too few arguments to function %<va_start%>" -@@ -17081,12 +17093,12 @@ +@@ -17081,12 +16959,12 @@ msgid "%Kattempt to free a non-heap object" msgstr "" @@ -218682,7 +230854,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "Pass all arguments on stack" msgid "passing too large argument on stack" -@@ -17699,251 +17711,256 @@ +@@ -17699,251 +17577,256 @@ msgid "number of bb notes in insn chain (%d) != n_basic_blocks (%d)" msgstr "antallet af basisbloknoter i instruktionskæden (%d) != n_basic_blocks (%d)" @@ -218987,7 +231159,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "string section missing" msgid "%s: section %s is missing" -@@ -18087,7 +18104,7 @@ +@@ -18087,7 +17970,7 @@ msgid "COLLECT_LTO_WRAPPER must be set" msgstr "" @@ -218996,7 +231168,7 @@ Index: gcc/po/da.po #: config/i386/intelmic-mkoffload.c:504 #, gcc-internal-format msgid "atexit failed" -@@ -18341,18 +18358,18 @@ +@@ -18341,18 +18224,18 @@ msgid " %s" msgstr " '%D'" @@ -219018,7 +231190,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "stack limits not supported on this target" msgid "global constructors not supported on this target" -@@ -18400,12 +18417,12 @@ +@@ -18400,12 +18283,12 @@ msgid "multiple EH personalities are supported only with assemblers supporting .cfi_personality directive" msgstr "" @@ -219033,7 +231205,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "-feliminate-dwarf2-dups is broken for C++, ignoring" msgstr "" -@@ -18614,7 +18631,7 @@ +@@ -18614,7 +18497,7 @@ msgid "total size of local objects too large" msgstr "størrelsen af tabellen '%s' er for stor" @@ -219042,7 +231214,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "impossible constraint in `asm'" msgid "impossible constraint in %<asm%>" -@@ -19091,9 +19108,9 @@ +@@ -19091,9 +18974,9 @@ msgstr "kan ikke skrive i uddatafil" #: gimple-ssa-isolate-paths.c:319 gimple-ssa-isolate-paths.c:448 tree.c:12136 @@ -219055,7 +231227,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid " `%#D' declared here" msgid "declared here" -@@ -19110,166 +19127,161 @@ +@@ -19110,166 +18993,161 @@ msgid "gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d" msgstr "træ-kontrol: forventede %s, har %s i %s, ved %s:%d" @@ -219251,7 +231423,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "if this code is reached, the program will abort" msgstr "" -@@ -19706,48 +19718,48 @@ +@@ -19706,48 +19584,48 @@ msgid "Max. number of generated reload insns per insn is achieved (%d)\n" msgstr "" @@ -219309,7 +231481,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "invalid rotate insn" msgid "invalid offload table in %s" -@@ -19835,50 +19847,50 @@ +@@ -19835,50 +19713,50 @@ msgid "malformed COLLECT_GCC_OPTIONS" msgstr "" @@ -219369,7 +231541,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "fopen %s" msgid "fopen: %s: %m" -@@ -20019,12 +20031,12 @@ +@@ -20019,12 +19897,12 @@ msgid "setjmp/longjmp inside simd construct" msgstr "" @@ -219384,7 +231556,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "invalid argument of `%s' attribute" msgid "invalid entry to %s structured block" -@@ -20031,18 +20043,18 @@ +@@ -20031,18 +19909,18 @@ msgstr "ugyldig parameter til egenskaben '%s'" #. Otherwise, be vague and lazy, but efficient. @@ -219406,7 +231578,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "ignoring zero linear step" msgstr "" -@@ -20571,8 +20583,8 @@ +@@ -20571,8 +20449,8 @@ msgstr "kan ikke bruge %qs som et fast register" #: reginfo.c:790 config/ia64/ia64.c:5983 config/ia64/ia64.c:5990 @@ -219417,7 +231589,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "unknown register name: %s" msgstr "ukendt registernavn: %s" -@@ -21012,7 +21024,7 @@ +@@ -21012,7 +20890,7 @@ msgid "ld returned %d exit status" msgstr "ld returnerede afslutningskoden %d" @@ -219426,7 +231598,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%q+F used but never defined" msgstr "%q+F brugt, men aldrig defineret" -@@ -22063,43 +22075,43 @@ +@@ -22063,43 +21941,43 @@ msgid "memory access check always fail" msgstr "" @@ -219478,7 +231650,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "chkp_walk_pointer_assignments: unexpected RHS type: %s" msgstr "" -@@ -22497,52 +22509,52 @@ +@@ -22497,52 +22375,52 @@ msgid "vectorization did not happen for a simd loop" msgstr "" @@ -219540,7 +231712,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "assuming signed overflow does not occur when simplifying %<abs (X)%> to %<X%> or %<-X%>" msgstr "" -@@ -22587,9 +22599,9 @@ +@@ -22587,9 +22465,9 @@ #: c-family/c-common.c:9217 c-family/c-common.c:9299 c-family/c-common.c:9446 #: config/darwin.c:2069 config/arm/arm.c:6250 config/arm/arm.c:6278 #: config/arm/arm.c:6295 config/avr/avr.c:8975 config/h8300/h8300.c:5496 @@ -219553,7 +231725,7 @@ Index: gcc/po/da.po #: lto/lto-lang.c:260 #, fuzzy, gcc-internal-format #| msgid "`%s' attribute ignored" -@@ -22846,7 +22858,7 @@ +@@ -22846,7 +22724,7 @@ msgid "requested alignment for %q+D is greater than implemented alignment of %wu" msgstr "%Jforespurgt justering for '%D' er større end den implementerede justering på %d" @@ -219562,7 +231734,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "storage size of `%D' isn't known" msgid "storage size of %q+D isn%'t known" -@@ -23010,27 +23022,27 @@ +@@ -23010,27 +22888,27 @@ msgid "string length %qd is greater than the length %qd ISO C%d compilers are required to support" msgstr "strenglængden '%d' er større end den længde på '%d' som ISO C%d-oversættere er pålagt at understøtte" @@ -219595,7 +231767,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "overflow in constant expression" msgstr "overløb i konstant udtryk" -@@ -23378,12 +23390,12 @@ +@@ -23378,12 +23256,12 @@ msgid "the address of %qD will always evaluate as %<true%>" msgstr "adressen af '%D' vil altid være 'true'" @@ -219610,7 +231782,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "invalid use of `restrict'" msgid "invalid use of %<restrict%>" -@@ -23879,12 +23891,12 @@ +@@ -23879,12 +23757,12 @@ msgid "invalid vector type for attribute %qE" msgstr "ugyldig vektortype for egenskaben '%s'" @@ -219625,7 +231797,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "zero vector size" msgstr "" -@@ -23894,24 +23906,24 @@ +@@ -23894,24 +23772,24 @@ msgid "number of components of the vector not a power of two" msgstr "" @@ -219654,7 +231826,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "nonnull argument references non-pointer operand (arg %lu, operand %lu)" msgid "nonnull argument references non-pointer operand (argument %lu, operand %lu)" -@@ -23957,13 +23969,13 @@ +@@ -23957,13 +23835,13 @@ msgid "%qE attribute only applies to variadic functions" msgstr "egenskaben '%s' kan kun anvendes sammen med funktioner" @@ -219670,7 +231842,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "requested position is less than zero" msgstr "" -@@ -24051,7 +24063,7 @@ +@@ -24051,7 +23929,7 @@ msgid "cannot apply %<offsetof%> to a non constant address" msgstr "" @@ -219679,7 +231851,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "attempt to take address of bit-field structure member `%D'" msgid "attempt to take address of bit-field structure member %qD" -@@ -24529,7 +24541,7 @@ +@@ -24529,7 +24407,7 @@ msgstr "akkumulatortal er uden for det gyldig interval" #: c-family/c-common.c:12214 c-family/c-common.c:12264 @@ -219688,7 +231860,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "conversion of scalar %qT to vector %qT involves truncation" msgstr "" -@@ -25025,7 +25037,7 @@ +@@ -25025,7 +24903,7 @@ msgid "%<#pragma omp atomic capture%> uses two different variables for memory" msgstr "" @@ -219697,7 +231869,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "invalid vector type for attribute `%s'" msgid "invalid type for iteration variable %qE" -@@ -25037,25 +25049,25 @@ +@@ -25037,25 +24915,25 @@ msgid "%qE is not initialized" msgstr "manglende startværdi" @@ -219727,7 +231899,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "Invalid control expression" msgid "invalid increment expression" -@@ -25639,6 +25651,12 @@ +@@ -25639,6 +25517,12 @@ msgid "too many input files" msgstr "for mange inddatafiler" @@ -219740,7 +231912,7 @@ Index: gcc/po/da.po #: common/config/alpha/alpha-common.c:76 #, fuzzy, gcc-internal-format #| msgid "bad value `%s' for -mtls-size switch" -@@ -25667,49 +25685,49 @@ +@@ -25667,49 +25551,49 @@ msgid "-mcpu=%s has invalid silicon revision" msgstr "" @@ -219799,7 +231971,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%<-fsplit-stack%> requires assembler support for CFI directives" msgstr "" -@@ -26119,70 +26137,70 @@ +@@ -26119,70 +26003,70 @@ msgid "lane %ld out of range %ld - %ld" msgstr "linjenummer er uden for det gyldige interval" @@ -219883,7 +232055,7 @@ Index: gcc/po/da.po #: config/tilegx/tilegx.c:3579 config/tilepro/tilepro.c:3147 #, gcc-internal-format msgid "bad builtin fcode" -@@ -26673,14 +26691,14 @@ +@@ -26673,14 +26557,14 @@ #: config/arm/arm.c:6218 config/arm/arm.c:6236 config/avr/avr.c:8995 #: config/avr/avr.c:9011 config/bfin/bfin.c:4699 config/bfin/bfin.c:4760 #: config/bfin/bfin.c:4789 config/epiphany/epiphany.c:507 @@ -219904,7 +232076,7 @@ Index: gcc/po/da.po #: config/v850/v850.c:2117 config/visium/visium.c:653 #, fuzzy, gcc-internal-format #| msgid "`%s' attribute only applies to functions" -@@ -27373,400 +27391,417 @@ +@@ -27373,400 +27257,417 @@ msgid "can%'t set position in PCH file: %m" msgstr "kan ikke oprette informationsfilen '%s' til opbevaringssted" @@ -220401,7 +232573,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "-fsplit-stack does not support 2 register parameters for a nested function" msgstr "" -@@ -27773,285 +27808,285 @@ +@@ -27773,285 +27674,285 @@ #. FIXME: We could make this work by pushing a register #. around the addition and comparison. @@ -220737,7 +232909,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Pointer Checker requires MPX support on this target. Use -mmpx options to enable MPX." msgstr "" -@@ -28145,13 +28180,13 @@ +@@ -28145,13 +28046,13 @@ msgid "%qE attribute requires a string constant argument" msgstr "%qE-egenskaben kræver et strengkonstant som parameter" @@ -220753,7 +232925,7 @@ Index: gcc/po/da.po #: config/spu/spu.c:4971 #, gcc-internal-format, gfc-internal-format msgid "%s-%s is an empty range" -@@ -28227,7 +28262,7 @@ +@@ -28227,7 +28128,7 @@ msgstr "sektionsegenskaber understøttes ikke på denne målarkitektur" #. The argument must be a constant integer. @@ -220762,7 +232934,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' attribute argument not an integer constant" msgid "%qE attribute argument not an integer constant" -@@ -28289,7 +28324,7 @@ +@@ -28289,7 +28190,7 @@ msgid "interrupt_thread is available only on fido" msgstr "interrupt_thread er kun tilgængelig på fido" @@ -220771,7 +232943,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "stack limit expression is not supported" msgstr "stakgrænseudtryk understøttes ikke" -@@ -29198,16 +29233,11 @@ +@@ -29198,16 +29099,11 @@ msgid "-g option disabled" msgstr "tilvalget -g deaktiveret" @@ -220789,7 +232961,7 @@ Index: gcc/po/da.po #. Address spaces are currently only supported by C. #: config/rl78/rl78.c:379 #, fuzzy, gcc-internal-format -@@ -29480,332 +29510,337 @@ +@@ -29480,332 +29376,337 @@ msgid "target attribute or pragma changes double precision floating point" msgstr "" @@ -221188,7 +233360,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "%s\"%s\"%s is invalid" msgstr "" -@@ -30061,93 +30096,93 @@ +@@ -30061,93 +29962,93 @@ msgid "requested %qE attribute is not a comma separated pair of non-negative integer constants or too large (max. %d)" msgstr "" @@ -221299,7 +233471,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "-mstack-guard implies use of -mstack-size" msgstr "" -@@ -30162,35 +30197,35 @@ +@@ -30162,35 +30063,35 @@ msgid "unwind tables currently require either a frame pointer or -maccumulate-outgoing-args for correctness" msgstr "" @@ -221341,7 +233513,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' attribute argument not an integer constant" msgid "%qE attribute argument should be between 0 to 255" -@@ -30197,24 +30232,24 @@ +@@ -30197,24 +30098,24 @@ msgstr "parameteren til egenskaben '%s' er ikke en heltalskonstant" #. The argument must be a constant string. @@ -221370,7 +233542,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "need a call-clobbered target register" msgstr "" -@@ -30619,49 +30654,49 @@ +@@ -30619,49 +30520,49 @@ msgid "subprogram %q+F not marked Inline" msgstr "" @@ -221429,7 +233601,7 @@ Index: gcc/po/da.po #: cp/cp-array-notation.c:264 #, fuzzy, gcc-internal-format #| msgid "invalid option argument `%s'" -@@ -30723,7 +30758,7 @@ +@@ -30723,7 +30624,7 @@ #. making it a constraint in that case was rejected in #. DR#252. #: c/c-convert.c:110 c/c-typeck.c:2144 c/c-typeck.c:5879 c/c-typeck.c:11329 @@ -221438,7 +233610,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "void value not ignored as it ought to be" msgstr "tom værdi er ikke ignoreret som den burde være" -@@ -30753,68 +30788,68 @@ +@@ -30753,68 +30654,68 @@ msgid "GCC supports only %u nested scopes" msgstr "" @@ -221519,7 +233691,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "prototype for `%s' follows and argument %d doesn't match" msgid "prototype for %q+D declares argument %d with incompatible type" -@@ -30822,44 +30857,44 @@ +@@ -30822,44 +30723,44 @@ #. If we get here, no errors were found, but do issue a warning #. for this poor-style construct. @@ -221572,7 +233744,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "redeclaration of `enum %s'" msgid "redeclaration of enumerator %q+D" -@@ -30868,158 +30903,158 @@ +@@ -30868,158 +30769,158 @@ #. If types don't match for a built-in, throw away the #. built-in. No point in calling locate_old_decl here, it #. won't print anything. @@ -221761,7 +233933,7 @@ Index: gcc/po/da.po #: cp/name-lookup.c:1287 #, fuzzy, gcc-internal-format #| msgid "%Jshadowed declaration is here" -@@ -31026,43 +31061,43 @@ +@@ -31026,43 +30927,43 @@ msgid "shadowed declaration is here" msgstr "%Jskygget erklæring er her" @@ -221812,7 +233984,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' undeclared (first use in this function)" msgid "%qE undeclared (first use in this function)" -@@ -31069,36 +31104,36 @@ +@@ -31069,36 +30970,36 @@ msgstr "'%s' er ikke erklæret (først benyttet i denne funktion)" # dækkende, og pænere end original i praktisk brug @@ -221855,7 +234027,7 @@ Index: gcc/po/da.po #: cp/class.c:3260 cp/decl.c:3631 cp/parser.c:5464 #, fuzzy, gcc-internal-format #| msgid " `%#D' declared here" -@@ -31105,127 +31140,127 @@ +@@ -31105,127 +31006,127 @@ msgid "%qD declared here" msgstr " '%#D' erklæret her" @@ -222007,7 +234179,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "ISO C90 does not support %<[*]%> array declarators" msgstr "ISO C90 understøtter ikke %<[*]%> arrayerklæringer" -@@ -31233,39 +31268,39 @@ +@@ -31233,39 +31134,39 @@ #. C99 6.7.5.2p4 #. A function definition isn't function prototype scope C99 6.2.1p4. #. C99 6.7.5.2p4 @@ -222054,7 +234226,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "parameter %qD is initialized" msgstr "parameteren %qD bliver tildelt en startværdi" -@@ -31274,117 +31309,117 @@ +@@ -31274,117 +31175,117 @@ #. of VLAs themselves count as VLAs, it does not make #. sense to permit them to be initialized given that #. ordinary VLAs may not be initialized. @@ -222193,7 +234365,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "width of `%s' exceeds its type" msgid "width of %qs exceeds its type" -@@ -31391,175 +31426,175 @@ +@@ -31391,175 +31292,175 @@ msgstr "bredden af '%s' overstiger typen" # RETMIG: find på et eller andet med præcisionen @@ -222399,7 +234571,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "function-scope `%s' implicitly auto and declared `__thread'" msgid "function-scope %qE implicitly auto and declared %qs" -@@ -31568,313 +31603,313 @@ +@@ -31568,313 +31469,313 @@ #. Only the innermost declarator (making a parameter be of #. array type which is converted to pointer type) #. may have static or type qualifiers. @@ -222769,7 +234941,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "invalid storage class for function `%s'" msgid "invalid storage class for function %qE" -@@ -31881,239 +31916,239 @@ +@@ -31881,239 +31782,239 @@ msgstr "ugyldig lagringsklasse for funktion '%s'" # at oversætte inline med et udsagnsord her bliver vist for tvetydigt @@ -223052,7 +235224,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "nested redefinition of `%s'" msgid "nested redefinition of %<enum %E%>" -@@ -32120,197 +32155,197 @@ +@@ -32120,197 +32021,197 @@ msgstr "indlejret omdefinering af '%s'" #. This enum is a named one that has been declared already. @@ -223287,7 +235459,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "label `%D' defined but not used" msgid "parameter %qD set but not used" -@@ -32319,217 +32354,217 @@ +@@ -32319,217 +32220,217 @@ #. If we get here, declarations have been used in a for loop without #. the C99 for loop scope. This doesn't make much sense, so don't #. allow it. @@ -223544,7 +235716,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%<#pragma omp declare reduction%> initializer refers to variable %qD which is not %<omp_priv%> nor %<omp_orig%>" msgstr "" -@@ -32540,7 +32575,7 @@ +@@ -32540,7 +32441,7 @@ msgid "identifier %qE conflicts with C++ keyword" msgstr "kaldenavnet '%s' er i modstrid med den interne navngivningsstrategi i GNU c++" @@ -223553,7 +235725,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "garbage at end of #line" msgid "expected end of line" -@@ -32564,8 +32599,8 @@ +@@ -32564,8 +32465,8 @@ msgid "unknown type name %qE" msgstr "ukendt registernavn: %s" @@ -223564,7 +235736,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "repeated declaration of unit `%s'" msgid "expected declaration specifiers" -@@ -32582,7 +32617,7 @@ +@@ -32582,7 +32483,7 @@ msgid "expected %<;%>, identifier or %<(%>" msgstr "" @@ -223573,7 +235745,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' attribute ignored for `%s'" msgid "prefix attributes are ignored for methods" -@@ -32662,7 +32697,7 @@ +@@ -32662,7 +32563,7 @@ msgid "ISO C90 does not support %<_Static_assert%>" msgstr "ISO C90 understøtter ikke komplekse typer" @@ -223582,7 +235754,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "_Pragma takes a parenthesized string literal" msgid "expected string literal" -@@ -32726,14 +32761,14 @@ +@@ -32726,14 +32627,14 @@ #: c/c-parser.c:8456 c/c-parser.c:8464 c/c-parser.c:8493 c/c-parser.c:8506 #: c/c-parser.c:8811 c/c-parser.c:8935 c/c-parser.c:9375 c/c-parser.c:9410 #: c/c-parser.c:9463 c/c-parser.c:9516 c/c-parser.c:9532 c/c-parser.c:9578 @@ -223601,7 +235773,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "comma at end of enumerator list" msgstr "komma i slutningen af enum-liste" -@@ -33220,32 +33255,32 @@ +@@ -33220,32 +33121,32 @@ msgid "no type or storage class may be specified here," msgstr "lagringsklasse angivet for typenavn" @@ -223640,7 +235812,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "the %<getter%> attribute may only be specified once" msgstr "en dataområdeegenskab kan ikke angives for lokale variable" -@@ -33255,47 +33290,47 @@ +@@ -33255,47 +33156,47 @@ msgid "%<#pragma acc update%> may only be used in compound statements" msgstr "" @@ -223697,7 +235869,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%<#pragma GCC pch_preprocess%> must be first" msgstr "" -@@ -33310,13 +33345,13 @@ +@@ -33310,13 +33211,13 @@ msgid "%<#pragma grainsize%> must be inside a function" msgstr "" @@ -223713,7 +235885,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "']' expected, invalid type expression" msgid "expected integer expression before ')'" -@@ -33328,30 +33363,30 @@ +@@ -33328,30 +33229,30 @@ msgid "expression must be integral" msgstr "udsagn skal være et kaldenavn" @@ -223749,7 +235921,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "expected %<none%> or %<shared%>" msgstr "" -@@ -33384,17 +33419,17 @@ +@@ -33384,17 +33285,17 @@ msgid "expected %<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, %<&&%>, %<||%>, %<min%> or %<max%>" msgstr "" @@ -223770,7 +235942,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "invalid schedule kind" msgstr "ugyldig roteringsinstruktion" -@@ -33414,12 +33449,12 @@ +@@ -33414,12 +33315,12 @@ msgid "%<thread_limit%> value must be positive" msgstr "" @@ -223785,7 +235957,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "using parameters for %<linear%> step is not supported yet" msgstr "" -@@ -33439,19 +33474,19 @@ +@@ -33439,19 +33340,19 @@ msgid "%<simdlen%> clause expression must be positive constant integer expression" msgstr "" @@ -223808,7 +235980,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "invalid dist_schedule kind" msgstr "ugyldig roteringsinstruktion" -@@ -33462,60 +33497,60 @@ +@@ -33462,60 +33363,60 @@ msgid "invalid proc_bind kind" msgstr "ugyldig roteringsinstruktion" @@ -223880,7 +236052,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%<#pragma omp atomic capture%> uses two different expressions for memory" msgstr "" -@@ -33525,19 +33560,19 @@ +@@ -33525,19 +33426,19 @@ msgid "expected %<(%> or end of line" msgstr "" @@ -223903,7 +236075,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "repeated declaration of automaton `%s'" msgid "expected iteration declaration or initialization" -@@ -33548,243 +33583,243 @@ +@@ -33548,243 +33449,243 @@ msgid "not enough perfectly nested loops" msgstr "" @@ -224195,7 +236367,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "unexpected address expression" msgid "expected array notation expression" -@@ -33796,7 +33831,7 @@ +@@ -33796,7 +33697,7 @@ msgid "%qD has an incomplete type" msgstr "'%s' er af en ufuldstændig type" @@ -224204,7 +236376,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "invalid use of void expression" msgstr "ugyldig brug af void-udtryk" -@@ -33910,7 +33945,7 @@ +@@ -33910,7 +33811,7 @@ msgid "subscripted value is neither array nor pointer nor vector" msgstr "værdien der er påført et indeks, er hverken en tabel eller en henvisningsvariabel" @@ -224213,7 +236385,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "array subscript is not an integer" msgstr "tabelindeks er ikke et heltal" -@@ -34051,7 +34086,7 @@ +@@ -34051,7 +33952,7 @@ msgid "passing argument %d of %qE as signed due to prototype" msgstr "%s som signed på grund af prototypen" @@ -224222,7 +236394,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "implicit conversion from %qT to %qT when passing argument to function" msgstr "" -@@ -34084,7 +34119,7 @@ +@@ -34084,7 +33985,7 @@ msgid "arithmetic on pointer to an incomplete type" msgstr "beregninger udført på en henvisning til en ufuldstændig type" @@ -224231,7 +236403,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "arithmetic on pointer to an incomplete type" msgid "arithmetic on pointer to an empty aggregate" -@@ -34185,7 +34220,7 @@ +@@ -34185,7 +34086,7 @@ msgid "non-lvalue array in conditional expression" msgstr "typerne i betingelsesudtrykket passer ikke sammen" @@ -224240,7 +236412,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "implicit conversion from %qT to %qT to match other result of conditional" msgstr "" -@@ -34223,7 +34258,7 @@ +@@ -34223,7 +34124,7 @@ msgid "pointer/integer type mismatch in conditional expression" msgstr "henvisnings- og heltalstype i betingelsesudtrykket passer ikke sammen" @@ -224249,7 +236421,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "spawned function call cannot be part of a comma expression" msgstr "" -@@ -34311,7 +34346,7 @@ +@@ -34311,7 +34212,7 @@ msgid "cast from function call of type %qT to non-matching type %qT" msgstr "" @@ -224258,7 +236430,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "cast to pointer from integer of different size" msgstr "typeomtvingelse fra heltal til henvisning af en anden størrelse" -@@ -34488,7 +34523,7 @@ +@@ -34488,7 +34389,7 @@ msgid "initialization left-hand side might be a candidate for a format attribute" msgstr "funktion er en mulig kandidat til '%s'-formateringsegenskab" @@ -224267,7 +236439,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "function might be possible candidate for `%s' format attribute" msgid "return type might be a candidate for a format attribute" -@@ -34650,7 +34685,7 @@ +@@ -34650,7 +34551,7 @@ msgid "initialization of a flexible array member" msgstr "klargøring af fleksibelt tabelmedlem" @@ -224276,7 +236448,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "char-array initialized from wide string" msgstr "char-tabel får tildelt startværdi fra en bred streng" -@@ -34700,7 +34735,7 @@ +@@ -34700,7 +34601,7 @@ msgid "invalid initializer" msgstr "ugyldig startværdi" @@ -224285,7 +236457,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "opaque vector types cannot be initialized" msgstr "objekt af typen '%T' med variabel størrelse må ikke tildeles en startværdi" -@@ -34853,7 +34888,7 @@ +@@ -34853,7 +34754,7 @@ msgid "ISO C forbids %<goto *expr;%>" msgstr "ISO C forbyder 'goto *udtryk;'" @@ -224294,7 +236466,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "function declared `noreturn' has a `return' statement" msgid "function declared %<noreturn%> has a %<return%> statement" -@@ -34865,7 +34900,7 @@ +@@ -34865,7 +34766,7 @@ msgid "array notation expression cannot be used as a return value" msgstr "kommaudtryk benyttet til at klargøre returværdi" @@ -224303,7 +236475,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "use of %<_Cilk_spawn%> in a return statement is not allowed" msgstr "" -@@ -34983,19 +35018,19 @@ +@@ -34983,19 +34884,19 @@ msgid "expression statement has incomplete type" msgstr "udtrykket er af en ufuldstændig type" @@ -224326,7 +236498,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "comparing floating point with == or != is unsafe" msgstr "sammenligning af kommatal med == eller != er ikke sikkert" -@@ -35049,12 +35084,12 @@ +@@ -35049,12 +34950,12 @@ msgstr "ordnet sammenligning af henvisning med heltallet nul" #: c/c-typeck.c:10947 c/c-typeck.c:10950 c/c-typeck.c:10957 c/c-typeck.c:10960 @@ -224341,7 +236513,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "implicit conversion from %qT to %qT to match other operand of binary expression" msgstr "" -@@ -35083,89 +35118,89 @@ +@@ -35083,89 +34984,89 @@ msgid "used vector type where scalar is required" msgstr "værdi af struct-type angivet hvor skalar er påkrævet" @@ -224450,7 +236622,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "type to vector delete is neither pointer or array type" msgid "%qE does not have pointer or array type" -@@ -35177,17 +35212,17 @@ +@@ -35177,17 +35078,17 @@ msgid "%qE has invalid type for %<reduction(%s)%>" msgstr "ugyldig returtype for funktionen '%#D'" @@ -224471,7 +236643,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%qE must be %<threadprivate%> for %<copyin%>" msgstr "" -@@ -35197,7 +35232,7 @@ +@@ -35197,7 +35098,7 @@ msgid "linear clause applied to non-integral non-pointer variable with type %qT" msgstr "" @@ -224480,7 +236652,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' is not a valid class name" msgid "%qE is not a variable in clause %qs" -@@ -35208,19 +35243,19 @@ +@@ -35208,19 +35109,19 @@ msgid "%qE appears more than once in data clauses" msgstr "" @@ -224503,7 +236675,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' is not a valid class name" msgid "%qE is not a variable in %<aligned%> clause" -@@ -35237,49 +35272,49 @@ +@@ -35237,49 +35138,49 @@ msgid "%qE appears more than once in %<aligned%> clauses" msgstr "" @@ -224562,7 +236734,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%qE is predetermined %qs for %qs" msgstr "" -@@ -35290,36 +35325,36 @@ +@@ -35290,36 +35191,36 @@ msgstr "" #. A bad conversion for 'this' must be discarding cv-quals. @@ -224605,7 +236777,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid " candidate expects %d argument, %d provided" msgid_plural " candidate expects %d arguments, %d provided" -@@ -35326,91 +35361,91 @@ +@@ -35326,91 +35227,91 @@ msgstr[0] "" msgstr[1] "" @@ -224713,7 +236885,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "call of overloaded `%D(%A)' is ambiguous" msgid "call of overloaded %<%D(%A)%> is ambiguous" -@@ -35418,501 +35453,501 @@ +@@ -35418,501 +35319,501 @@ #. It's no good looking for an overloaded operator() on a #. pointer-to-member-function. @@ -225306,7 +237478,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "invalid initialization of reference of type %qT from expression of type %qT" msgstr "ugyldig omdannelse til typen '%T' fra typen '%T'" -@@ -36086,7 +36121,7 @@ +@@ -36086,7 +35987,7 @@ msgid " by %q+D" msgstr " af '%D'" @@ -225315,7 +237487,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%#D' invalid; an anonymous union can only have non-static data members" msgid "%q+#D invalid; an anonymous union can only have non-static data members" -@@ -36098,7 +36133,7 @@ +@@ -36098,7 +35999,7 @@ msgid "%q+#D invalid; an anonymous struct can only have non-static data members" msgstr "'%#D' er ugyldig; en anonym union kan kun have ikke-statiske datamedlemmer" @@ -225324,7 +237496,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "private member `%#D' in anonymous union" msgid "private member %q+#D in anonymous union" -@@ -36110,7 +36145,7 @@ +@@ -36110,7 +36011,7 @@ msgid "private member %q+#D in anonymous struct" msgstr "privat medlem '%#D' i en anonym union" @@ -225333,7 +237505,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "protected member `%#D' in anonymous union" msgid "protected member %q+#D in anonymous union" -@@ -36261,74 +36296,85 @@ +@@ -36261,74 +36162,85 @@ msgid " but does not override %<operator=(const %T&)%>" msgstr " men overskriver ikke 'operator=(const %T&)'" @@ -225432,7 +237604,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "non-static const member `%#D' in class without a constructor" msgid "non-static const member %q+#D in class without a constructor" -@@ -36336,114 +36382,114 @@ +@@ -36336,114 +36248,114 @@ #. If the function is defaulted outside the class, we just #. give the synthesis error. @@ -225567,7 +237739,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "cannot convert `%E' from type `%T' to type `%T'" msgid "cannot convert %qE from type %qT to type %qT" -@@ -36454,13 +36500,13 @@ +@@ -36454,13 +36366,13 @@ #. A name N used in a class S shall refer to the same declaration #. in its context and when re-evaluated in the completed scope of #. S. @@ -225583,7 +237755,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "changes meaning of `%D' from `%+#D'" msgid "changes meaning of %qD from %q+#D" -@@ -36504,43 +36550,43 @@ +@@ -36504,43 +36416,43 @@ msgid "constexpr constructor does not have empty body" msgstr "" @@ -225635,7 +237807,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "call to non-function `%D'" msgid "call to non-constexpr function %qD" -@@ -36547,236 +36593,236 @@ +@@ -36547,236 +36459,236 @@ msgstr "kald af ikke-funktion '%D'" #. The definition of fun was somehow unsuitable. @@ -225914,7 +238086,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "unexpected type for `id' (%s)" msgid "unexpected AST of kind %s" -@@ -36850,7 +36896,7 @@ +@@ -36850,7 +36762,7 @@ msgid "try statements are not allowed inside loops marked with #pragma simd" msgstr "" @@ -225923,7 +238095,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%qE implicitly determined as %<firstprivate%> has reference type" msgstr "" -@@ -36893,7 +36939,7 @@ +@@ -36893,7 +36805,7 @@ msgid "conversion from %qT to %qT discards qualifiers" msgstr "konvertering fra '%T' til '%T' forkaster modifikationer" @@ -225932,7 +238104,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "casting `%T' to `%T' does not dereference pointer" msgid "casting %qT to %qT does not dereference pointer" -@@ -36905,326 +36951,326 @@ +@@ -36905,326 +36817,326 @@ msgid "cannot convert type %qT to type %qT" msgstr "kan ikke konvertere typen '%T' til typen '%T'" @@ -226317,7 +238489,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid " candidate conversions include `%D' and `%D'" msgid " candidate conversions include %qD and %qD" -@@ -37690,126 +37736,126 @@ +@@ -37690,126 +37602,126 @@ msgid "template parameters do not match template %qD" msgstr "skabelonsparametre kan ikke være venner" @@ -226466,7 +238638,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%s' attribute can only be applied to class definitions" msgid "ignoring attributes applied to class type %qT outside of definition" -@@ -37816,145 +37862,145 @@ +@@ -37816,145 +37728,145 @@ msgstr "egenskaben '%s' kan kun anvendes med klassedefinitioner" #. A template type parameter or other dependent type. @@ -226637,7 +238809,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "zero-size array `%D'" msgid "zero-size array %qD" -@@ -37963,247 +38009,247 @@ +@@ -37963,247 +37875,247 @@ #. An automatic variable with an incomplete type: that is an error. #. Don't talk about array types here, since we took care of that #. message in grokdeclarator. @@ -226929,7 +239101,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%D' declared as an `inline' %s" msgid "%qD declared as an %<inline%> variable" -@@ -38210,37 +38256,37 @@ +@@ -38210,37 +38122,37 @@ msgstr "'%D' erklæret som 'inline' %s" # %s bliver omsat til typen @@ -226973,7 +239145,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%D' declared as an `inline' %s" msgid "%qD declared as an %<inline%> type" -@@ -38247,19 +38293,19 @@ +@@ -38247,19 +38159,19 @@ msgstr "'%D' erklæret som 'inline' %s" # %s bliver omsat til typen @@ -226996,7 +239168,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%D' declared as an `inline' %s" msgid "%qD declared as an %<inline%> field" -@@ -38266,37 +38312,37 @@ +@@ -38266,37 +38178,37 @@ msgstr "'%D' erklæret som 'inline' %s" # %s bliver omsat til typen @@ -227040,7 +239212,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "defining explicit specialization `%D' in friend declaration" msgid "defining explicit specialization %qD in friend declaration" -@@ -38303,614 +38349,614 @@ +@@ -38303,614 +38215,614 @@ msgstr "definering af eksplicit specialisering '%D' i friend-erklæring" #. Something like `template <class T> friend void f<T>()'. @@ -227761,7 +239933,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%qs function with trailing return type has %qT as its type rather than plain %<auto%>" msgstr "" -@@ -38917,299 +38963,299 @@ +@@ -38917,299 +38829,299 @@ #. Not using maybe_warn_cpp0x because this should #. always be an error. @@ -228113,7 +240285,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%T' has no non-static data member named `%D'" msgid "non-static data member declared %<auto%>" -@@ -39216,156 +39262,156 @@ +@@ -39216,156 +39128,156 @@ msgstr "'%T' har intet ikke-statisk medlem ved navn '%D'" #. Something like struct S { int N::j; }; @@ -228296,7 +240468,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "cannot declare member function `%D' to have static linkage" msgid "cannot declare member function %qD to have static linkage" -@@ -39372,89 +39418,89 @@ +@@ -39372,89 +39284,89 @@ msgstr "kan ikke erklære medlemsfunktion '%D' til at have statisk kædning" #. FIXME need arm citation @@ -228401,7 +240573,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "parameter `%D' includes %s to array of unknown bound `%T'" msgid "parameter %qD includes reference to array of unknown bound %qT" -@@ -39475,77 +39521,77 @@ +@@ -39475,77 +39387,77 @@ #. or implicitly defined), there's no need to worry about their #. existence. Theoretically, they should never even be #. instantiated, but that's hard to forestall. @@ -228492,7 +240664,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "conversion to %s%s will never use a type conversion operator" msgid "conversion to a base class will never use a type conversion operator" -@@ -39552,123 +39598,123 @@ +@@ -39552,123 +39464,123 @@ msgstr "konvertering til %s%s vil aldrig bruge en typekonverteringsoperator" #. 13.4.0.3 @@ -228637,7 +240809,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "%qT referred to as enum" msgstr "'%#D' omerklæret som %C" -@@ -39680,29 +39726,29 @@ +@@ -39680,29 +39592,29 @@ #. void f(class C); // No template header here #. #. then the required template argument is missing. @@ -228673,7 +240845,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "friend declaration `%#D' declares a non-template function" msgid "redeclaration of %qT as a non-template" -@@ -39709,67 +39755,67 @@ +@@ -39709,67 +39621,67 @@ msgstr "friend-erklæring '%#D' erklærer en ikke-skabelonsfunktion" # hænger sammen med næste tekst @@ -228753,7 +240925,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "underlying type %<%T%> of %<%T%> must be an integral type" msgstr "" -@@ -39778,96 +39824,96 @@ +@@ -39778,96 +39690,96 @@ #. #. IF no integral type can represent all the enumerator values, the #. enumeration is ill-formed. @@ -228867,7 +241039,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "use of %qD before deduction of %<auto%>" msgstr "" -@@ -39912,7 +39958,7 @@ +@@ -39912,7 +39824,7 @@ msgid "deleting %qT is undefined" msgstr "benyttelse af delete på '%T' er ikke defineret" @@ -228876,7 +241048,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "template declaration of `%#D'" msgid "template declaration of %q#D" -@@ -39939,7 +39985,7 @@ +@@ -39939,7 +39851,7 @@ #. [temp.mem] #. #. A destructor shall not be a member template. @@ -228885,7 +241057,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "destructor %qD declared as member template" msgstr "datamedlem '%D' kan ikke være en medlemsskabelon" -@@ -40045,27 +40091,27 @@ +@@ -40045,27 +39957,27 @@ msgid "width of bit-field %qD has non-integral type %qT" msgstr "bitfelt '%#D' med en ikke-heltalstype" @@ -228918,7 +241090,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`operator new' must return type `%T'" msgid "%<operator new%> must return type %qT" -@@ -40075,50 +40121,50 @@ +@@ -40075,50 +39987,50 @@ #. #. The first parameter shall not have an associated default #. argument. @@ -228978,7 +241150,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "%J'%F' declared `static' but never defined" msgid "%q#D, declared using anonymous type, is used but never defined" -@@ -40128,51 +40174,51 @@ +@@ -40128,51 +40040,51 @@ #. no linkage can only be used to declare extern "C" #. entities. Since it's not always an error in the #. ISO C++ 90 Standard, we only issue a warning. @@ -229039,7 +241211,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "default argument missing for parameter %P of `%+#D'" msgid "default argument missing for parameter %P of %q+#D" -@@ -40180,12 +40226,12 @@ +@@ -40180,12 +40092,12 @@ #. We mark a lambda conversion op as deleted if we can't #. generate it properly; see maybe_add_lambda_conv_op. @@ -229054,7 +241226,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "sizeof applied to a function type" msgid "use of deleted function %qD" -@@ -40825,42 +40871,42 @@ +@@ -40825,42 +40737,42 @@ msgid "neither the destructor nor the class-specific operator delete [] will be called, even if they are declared when the class is defined" msgstr "" @@ -229105,7 +241277,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "type to vector delete is neither pointer or array type" msgstr "variablen til tabel-delete er hverken af en henvisnings- eller en tabeltype" -@@ -40995,17 +41041,17 @@ +@@ -40995,17 +40907,17 @@ msgid "string literal in function template signature" msgstr "" @@ -229126,7 +241298,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "the mangled name of %q+D changes between -fabi-version=%d (%D) and -fabi-version=%d (%D)" msgstr "" -@@ -41463,7 +41509,7 @@ +@@ -41463,7 +41375,7 @@ msgid "identifier %qE is a keyword in C++11" msgstr "" @@ -229135,7 +241307,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%<#pragma omp declare simd%> not immediately followed by function declaration or definition" msgstr "" -@@ -41490,7 +41536,7 @@ +@@ -41490,7 +41402,7 @@ msgid "request for member %qE in non-class type %qT" msgstr "forespørgsel efter medlemmet '%D' i '%E' som er af en ikke-klassetype '%T'" @@ -229144,7 +241316,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "%<%T::%E%> has not been declared" msgstr "'%#D' kan ikke erklæres" -@@ -41565,7 +41611,7 @@ +@@ -41565,7 +41477,7 @@ msgid "(perhaps a semicolon is missing after the definition of %qT)" msgstr "semikolon mangler efter erklæring af '%T'" @@ -229153,7 +241325,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%T' is not a template" msgid "%qT is not a template" -@@ -41593,7 +41639,7 @@ +@@ -41593,7 +41505,7 @@ msgid "floating-point literal cannot appear in a constant-expression" msgstr "overløb i konstant udtryk" @@ -229162,7 +241334,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "a cast to a type other than an integral or enumeration type cannot appear in a constant-expression" msgstr "" -@@ -41875,7 +41921,7 @@ +@@ -41875,7 +41787,7 @@ msgid "literal operator suffixes not preceded by %<_%> are reserved for future standardization" msgstr "" @@ -229171,7 +241343,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "expected unqualified-id" msgstr "" -@@ -42061,7 +42107,7 @@ +@@ -42061,7 +41973,7 @@ msgid "capture of non-variable %qD " msgstr "" @@ -229180,7 +241352,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid " `%#D' declared here" msgid "%q+#D declared here" -@@ -42126,7 +42172,7 @@ +@@ -42126,7 +42038,7 @@ msgid "compound-statement in constexpr function" msgstr "I sætningsfunktion" @@ -229189,7 +241361,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "empty body in an else-statement" msgid "expected selection-statement" -@@ -42158,7 +42204,7 @@ +@@ -42158,7 +42070,7 @@ msgid "inconsistent begin/end types in range-based %<for%> statement: %qT and %qT" msgstr "" @@ -229198,7 +241370,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "expected iteration-statement" msgstr "uventet operand" -@@ -42190,12 +42236,12 @@ +@@ -42190,12 +42102,12 @@ msgid "ISO C++ forbids computed gotos" msgstr "ISO C++ forbyder beregnede goto'er" @@ -229213,7 +241385,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "extra %<;%>" msgstr "" -@@ -42244,7 +42290,7 @@ +@@ -42244,7 +42156,7 @@ msgid "class definition may not be declared a friend" msgstr "funktionen '%D' kan ikke erklæres friend" @@ -229222,7 +241394,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "templates may not be %<virtual%>" msgstr "" -@@ -42343,13 +42389,13 @@ +@@ -42343,13 +42255,13 @@ msgid "keyword %<export%> not implemented, and will be ignored" msgstr "det reserverede ord 'export' er ikke implementeret og vil blive ignoreret" @@ -229238,7 +241410,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "template parameters cannot be friends" msgid "template parameter pack cannot have a default argument" -@@ -42366,7 +42412,7 @@ +@@ -42366,7 +42278,7 @@ msgid "expected template-id" msgstr "uventet operand" @@ -229247,7 +241419,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "';' expected" msgid "expected %<<%>" -@@ -42447,228 +42493,228 @@ +@@ -42447,228 +42359,228 @@ msgid "expected type specifier" msgstr "sigof-typeangivelse" @@ -229517,7 +241689,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualified name" msgstr "" -@@ -42677,7 +42723,7 @@ +@@ -42677,7 +42589,7 @@ #. here because we do not have enough #. information about its original syntactic #. form. @@ -229526,7 +241698,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "invalid declarator" msgstr "ugyldig erklærer" -@@ -42684,309 +42730,309 @@ +@@ -42684,309 +42596,309 @@ #. But declarations with qualified-ids can't appear in a #. function. @@ -229894,7 +242066,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format msgid "too few template-parameter-lists" msgstr "for få skabelonsparameterlister angivet i erklæring af '%D'" -@@ -42995,522 +43041,522 @@ +@@ -42995,522 +42907,522 @@ #. something like: #. #. template <class T> template <class U> void S::f(); @@ -230516,7 +242688,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "specializing `%#T' in different namespace" msgid "specialization of %qD in different namespace" -@@ -43517,42 +43563,42 @@ +@@ -43517,42 +43429,42 @@ msgstr "specialiserer '%#T' i andet navnerum" # hænger sammen med foregående tekst, derfor ikke 'fra' @@ -230566,7 +242738,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "specializing `%#T' in different namespace" msgid "specializing %q#T in different namespace" -@@ -43560,76 +43606,76 @@ +@@ -43560,76 +43472,76 @@ #. But if we've had an implicit instantiation, that's a #. problem ([temp.expl.spec]/6). @@ -230656,7 +242828,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "members of an explicitly specialized class are defined without a template header" msgstr "" -@@ -43636,62 +43682,62 @@ +@@ -43636,62 +43548,62 @@ #. This case handles bogus declarations like template <> #. template <class T> void f<int>(); @@ -230730,7 +242902,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%D' not declared" msgid "%qD is not declared in %qD" -@@ -43705,94 +43751,94 @@ +@@ -43705,94 +43617,94 @@ #. program is ill-formed. #. #. Similar language is found in [temp.explicit]. @@ -230842,7 +243014,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "template argument `%E' involves template parameter(s)" msgid "template argument %qE involves template parameter(s)" -@@ -43799,7 +43845,7 @@ +@@ -43799,7 +43711,7 @@ msgstr "skabelonsparameter '%E' involverer skabelonsparameter" # flertalsform unødvendig @@ -230851,7 +243023,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "type `%T' of template argument `%E' depends on template parameter(s)" msgid "type %qT of template argument %qE depends on a template parameter" -@@ -43807,13 +43853,13 @@ +@@ -43807,13 +43719,13 @@ msgstr[0] "typen '%T' af skabelonsparameteren '%E' afhænger af skabelonsparameter" msgstr[1] "typen '%T' af skabelonsparameteren '%E' afhænger af skabelonsparameter" @@ -230867,7 +243039,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "no default argument for `%D'" msgid "no default argument for %qD" -@@ -43822,46 +43868,46 @@ +@@ -43822,46 +43734,46 @@ #. A primary class template can only have one #. parameter pack, at the end of the template #. parameter list. @@ -230922,7 +243094,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "member template %qD may not have virt-specifiers" msgstr "" -@@ -43871,66 +43917,66 @@ +@@ -43871,66 +43783,66 @@ #. An allocation function can be a function #. template. ... Template allocation functions shall #. have two or more parameters. @@ -231000,7 +243172,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "`%D' used without template parameters" msgid "redeclared with %d template parameter" -@@ -43938,7 +43984,7 @@ +@@ -43938,7 +43850,7 @@ msgstr[0] "'%D' benyttet uden skabelonsparametre" msgstr[1] "'%D' benyttet uden skabelonsparametre" @@ -231009,7 +243181,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "previous declaration `%#D' here" msgid "previous declaration %q+D used %d template parameter" -@@ -43946,13 +43992,13 @@ +@@ -43946,13 +43858,13 @@ msgstr[0] "tidligere erklæring af '%#D' her" msgstr[1] "tidligere erklæring af '%#D' her" @@ -231025,7 +243197,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "redeclared here as `%#D'" msgid "redeclared here as %q#D" -@@ -43962,114 +44008,114 @@ +@@ -43962,114 +43874,114 @@ #. #. A template-parameter may not be given default arguments #. by two different declarations in the same scope. @@ -231160,7 +243332,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid " candidate expects at least %d argument, %d provided" msgid_plural " candidate expects at least %d arguments, %d provided" -@@ -44076,195 +44122,195 @@ +@@ -44076,195 +43988,195 @@ msgstr[0] "" msgstr[1] "" @@ -231390,7 +243562,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid " expected a template of type `%D', got `%D'" msgid " expected a template of type %qD, got %qT" -@@ -44272,85 +44318,85 @@ +@@ -44272,85 +44184,85 @@ #. Not sure if this is reachable, but it doesn't hurt #. to be robust. @@ -231491,7 +243663,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "redefinition of default argument for `%#D'" msgid " when instantiating default argument for call to %D" -@@ -44369,305 +44415,305 @@ +@@ -44369,305 +44281,305 @@ #. #. is an attempt to declare a variable with function #. type. @@ -231850,7 +244022,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "duplicate explicit instantiation of `%#T'" msgid "duplicate explicit instantiation of %q#T" -@@ -44680,69 +44726,69 @@ +@@ -44680,69 +44592,69 @@ #. member function or static data member of a class template #. shall be present in every translation unit in which it is #. explicitly instantiated. @@ -231932,7 +244104,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "inconsistent deduction for %qT: %qT and then %qT" msgstr "" -@@ -45010,52 +45056,52 @@ +@@ -45010,52 +44922,52 @@ msgid "invalid base-class specification" msgstr "ugyldig stamklasseangivelse" @@ -231994,7 +244166,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "use of class template `%T' as expression" msgid "use of class template %qT as expression" -@@ -45062,24 +45108,24 @@ +@@ -45062,24 +44974,24 @@ msgstr "brug af klasseskabelonen '%T' som udtryk" #. Ambiguous reference to base members. @@ -232023,7 +244195,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`%T' is not a template type" msgid "%qT is not an enumeration type" -@@ -45086,202 +45132,202 @@ +@@ -45086,202 +44998,202 @@ msgstr "'%T' er ikke en skabelonstype" #. Parameter packs can only be used in templates @@ -232264,7 +244436,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "%s cannot resolve address of overloaded function" msgid "decltype cannot resolve address of overloaded function" -@@ -45299,133 +45345,133 @@ +@@ -45299,133 +45211,133 @@ msgid "lambda-expression in a constant expression" msgstr "overløb i konstant udtryk" @@ -232421,7 +244593,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "lang_* check: failed in %s, at %s:%d" msgstr "lang_*-kontrol: mislykkedes i %s, ved %s:%d" -@@ -45636,243 +45682,238 @@ +@@ -45636,243 +45548,238 @@ msgid "rank of the array%'s index is greater than 1" msgstr "" @@ -232707,7 +244879,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "parenthesis around '%E' cannot be used to form a pointer-to-member-function" msgid "parentheses around %qE cannot be used to form a pointer-to-member-function" -@@ -45879,12 +45920,12 @@ +@@ -45879,12 +45786,12 @@ msgstr "paranteser omkring '%E' kan ikke bruges til at danne en henvisning til medlemsfunktion" #. An expression like &memfn. @@ -232722,7 +244894,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "ISO C++ forbids taking the address of a bound member function to form a pointer to member function. Say `&%T::%D'" msgid "ISO C++ forbids taking the address of a bound member function to form a pointer to member function. Say %<&%T::%D%>" -@@ -45891,387 +45932,387 @@ +@@ -45891,387 +45798,387 @@ msgstr "ISO C++ forbyder at tage adressen på en bundet medlemsfunktion for at danne en henvisning til medlemsfunktion; brug '&%T::%D'" #. Make this a permerror because we used to accept it. @@ -233177,7 +245349,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "returning a value from a destructor" msgstr "returnerer en værdi fra en destruktionsfunktion" -@@ -46278,35 +46319,35 @@ +@@ -46278,35 +46185,35 @@ #. If a return statement appears in a handler of the #. function-try-block of a constructor, the program is ill-formed. @@ -233219,7 +245391,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "`operator new' must not return NULL unless it is declared `throw()' (or -fcheck-new is in effect)" msgid "%<operator new%> must not return NULL unless it is declared %<throw()%> (or -fcheck-new is in effect)" -@@ -46313,12 +46354,12 @@ +@@ -46313,12 +46220,12 @@ msgstr "'operator new' må ikke returnere NULL medmindre den er erklæret 'throw()' (eller -fcheck-new er benyttet)" #. Make this a permerror because we used to accept it. @@ -233234,7 +245406,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "using xvalue (rvalue reference) as lvalue" msgstr "" -@@ -46579,139 +46620,139 @@ +@@ -46579,139 +46486,139 @@ msgid "narrowing conversion of %qE from %qT to %qT inside { } is ill-formed in C++11" msgstr "" @@ -233398,7 +245570,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "call to function which throws incomplete type `%#T'" msgid "call to function which throws incomplete type %q#T" -@@ -46895,8 +46936,8 @@ +@@ -46895,8 +46802,8 @@ #: fortran/array.c:213 fortran/array.c:596 fortran/check.c:2581 #: fortran/check.c:4859 fortran/check.c:4897 fortran/check.c:4939 @@ -233409,7 +245581,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Coarrays disabled at %C, use %<-fcoarray=%> to enable" msgstr "" -@@ -47038,7 +47079,7 @@ +@@ -47038,7 +46945,7 @@ msgid "Array constructor including type specification at %C" msgstr "" @@ -233418,7 +245590,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Type-spec at %L cannot contain a deferred type parameter" msgstr "" -@@ -47157,7 +47198,7 @@ +@@ -47157,7 +47064,7 @@ msgid "%qs argument of %qs intrinsic at %L must be INTEGER or PROCEDURE" msgstr "" @@ -233427,7 +245599,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "argument 1 of __builtin_spe_predicate must be a constant" msgid "%qs argument of %qs intrinsic at %L must be a constant" -@@ -47759,12 +47800,12 @@ +@@ -47759,12 +47666,12 @@ msgid "%<source%> argument of %<shape%> intrinsic at %L must not be an assumed size array" msgstr "" @@ -233442,7 +245614,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "%qs argument of %qs intrinsic at %L shall not be TYPE(*)" msgstr "" -@@ -48036,6 +48077,11 @@ +@@ -48036,6 +47943,11 @@ msgid "%qs argument of %qs intrinsic at %L must be INTEGER or LOGICAL" msgstr "" @@ -233454,7 +245626,7 @@ Index: gcc/po/da.po #: fortran/class.c:614 #, gcc-internal-format, gfc-internal-format msgid "Assumed size polymorphic objects or components, such as that at %C, have not yet been implemented" -@@ -48043,7 +48089,7 @@ +@@ -48043,7 +47955,7 @@ #. Since the extension field is 8 bit wide, we can only have #. up to 255 extension levels. @@ -233463,7 +245635,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Maximum extension level reached with type %qs at %L" msgstr "" -@@ -48273,420 +48319,420 @@ +@@ -48273,420 +48185,420 @@ msgid "Variable %qs at %C with an initializer already appears in a DATA statement" msgstr "" @@ -233965,7 +246137,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Return type of BIND(C) function %qs at %L cannot be a character string" msgstr "" -@@ -48693,289 +48739,290 @@ +@@ -48693,289 +48605,290 @@ #. Use gfc_warning_now because we won't say that the symbol fails #. just because of this. @@ -234316,7 +246488,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "No label definition for FORMAT statement at %0" msgid "END statement instead of %s statement at %L" -@@ -48982,538 +49029,544 @@ +@@ -48982,538 +48895,544 @@ msgstr "Ingen etiketdefinition for FORMAT-sætning ved %0" #. We would have required END [something]. @@ -234964,7 +247136,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Syntax error in !GCC$ ATTRIBUTES statement at %C" msgstr "" -@@ -49799,350 +49852,350 @@ +@@ -49799,350 +49718,350 @@ msgid "Different shape for %s at %L on dimension %d (%d and %d)" msgstr "" @@ -235383,7 +247555,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "can't open output file `%s'" msgid "can't open input file: %s" -@@ -50167,27 +50220,27 @@ +@@ -50167,27 +50086,27 @@ msgid "Removing call to function %qs at %L" msgstr "Ingen kald i funktionen %s\n" @@ -235416,7 +247588,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Variable '%s' at %L not definable inside loop beginning at %L as INTENT(INOUT) argument to function '%s'" msgstr "" -@@ -50245,600 +50298,605 @@ +@@ -50245,600 +50164,605 @@ msgid "Expected %<END INTERFACE ASSIGNMENT (=)%> at %C" msgstr "" @@ -236140,7 +248312,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Passed-object dummy argument of %qs at %L must be at the same position as the passed-object dummy argument of the overridden procedure" msgstr "" -@@ -51272,12 +51330,12 @@ +@@ -51272,12 +51196,12 @@ msgid "ASYNCHRONOUS= at %C not allowed in Fortran 95" msgstr "" @@ -236155,7 +248327,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "DECIMAL= at %C not allowed in Fortran 95" msgstr "" -@@ -51287,7 +51345,7 @@ +@@ -51287,7 +51211,7 @@ msgid "ENCODING= at %C not allowed in Fortran 95" msgstr "" @@ -236164,7 +248336,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "ROUND= at %C not allowed in Fortran 95" msgstr "" -@@ -51312,131 +51370,131 @@ +@@ -51312,131 +51236,131 @@ msgid "UNIT number in CLOSE statement at %L must be non-negative" msgstr "" @@ -236320,7 +248492,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "Invalid expression statement" msgid "Expected expression in %s statement at %C" -@@ -51443,677 +51501,677 @@ +@@ -51443,677 +51367,677 @@ msgstr "Ugyldig udtrykssætning" #. A general purpose syntax error. @@ -237130,7 +249302,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format msgid "Syntax error in common block name at %C" msgstr "\"%s\" må ikke optræde i makroparameterliste" -@@ -52121,157 +52179,157 @@ +@@ -52121,157 +52045,157 @@ #. If we find an error, just print it and continue, #. cause it's just semantic, and we can see if there #. are more errors. @@ -237317,7 +249489,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Label %qs at %C doesn't match WHERE label %qs" msgstr "" -@@ -52424,175 +52482,175 @@ +@@ -52424,175 +52348,175 @@ msgid "Namelist %s cannot be renamed by USE association to %s" msgstr "" @@ -237527,7 +249699,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Can't USE the same module we're building!" msgstr "" -@@ -52888,7 +52946,7 @@ +@@ -52888,7 +52812,7 @@ msgid "Implicitly declared subroutine %s used in !$OMP DECLARE REDUCTION at %L " msgstr "" @@ -237536,7 +249708,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "IF clause at %L requires a scalar LOGICAL expression" msgstr "" -@@ -53590,378 +53648,373 @@ +@@ -53590,378 +53514,373 @@ msgid "Unexpected %s statement at %C" msgstr "Ikke-understøttet VXT-sætning ved %0" @@ -237987,7 +250159,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "Unsupported VXT statement at %0" msgid "Unexpected %s statement in MODULE at %C" -@@ -53970,7 +54023,7 @@ +@@ -53970,7 +53889,7 @@ #. If we see a duplicate main program, shut down. If the second #. instance is an implied main program, i.e. data decls or executable #. statements, we're in for lots of errors. @@ -237996,7 +250168,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Two main PROGRAMs at %L and %C" msgstr "" -@@ -54685,7 +54738,7 @@ +@@ -54685,7 +54604,7 @@ msgid "Non-RECURSIVE procedure %qs at %L is possibly calling itself recursively. Declare it RECURSIVE or use %<-frecursive%>" msgstr "" @@ -238005,7 +250177,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format, gfc-internal-format #| msgid "Label %A already defined at %1 when redefined at %0" msgid "Label %d referenced at %L is never defined" -@@ -54745,372 +54798,372 @@ +@@ -54745,372 +54664,372 @@ msgid "Passing internal procedure at %L by location not allowed" msgstr "" @@ -238450,7 +250622,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Assumed-type variable %s at %L may only be used as actual argument" msgstr "" -@@ -55119,12 +55172,12 @@ +@@ -55119,12 +55038,12 @@ #. for all inquiry functions in resolve_function; the reason is #. that the function-name resolution happens too late in that #. function. @@ -238465,7 +250637,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Assumed-rank variable %s at %L may only be used as actual argument" msgstr "" -@@ -55133,253 +55186,253 @@ +@@ -55133,253 +55052,253 @@ #. for all inquiry functions in resolve_function; the reason is #. that the function-name resolution happens too late in that #. function. @@ -238768,7 +250940,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Allocate-object at %L is subobject of object at %L" msgstr "" -@@ -55388,190 +55441,190 @@ +@@ -55388,190 +55307,190 @@ #. element in the list. Either way, we must #. issue an error and get the next case from P. #. FIXME: Sort P and Q by line number. @@ -238996,7 +251168,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Branch at %L may result in an infinite loop" msgstr "" -@@ -55578,12 +55631,12 @@ +@@ -55578,12 +55497,12 @@ #. Note: A label at END CRITICAL does not leave the CRITICAL #. construct as END CRITICAL is still part of it. @@ -239011,7 +251183,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "GOTO statement at %L leaves DO CONCURRENT construct for label at %L" msgstr "" -@@ -55591,160 +55644,160 @@ +@@ -55591,160 +55510,160 @@ #. The label is not in an enclosing block, so illegal. This was #. allowed in Fortran 66, so we allow it as extension. No #. further checks are necessary in this case. @@ -239203,7 +251375,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Variable %s with binding label %s at %L uses the same global identifier as entity at %L" msgstr "" -@@ -55751,7 +55804,7 @@ +@@ -55751,7 +55670,7 @@ #. This can only happen if the variable is defined in a module - if it #. isn't the same module, reject it. @@ -239212,7 +251384,7 @@ Index: gcc/po/da.po #, gcc-internal-format, gfc-internal-format msgid "Variable %s from module %s with binding label %s at %L uses the same global identifier as entity at %L from module %s" msgstr "" -@@ -55759,58 +55812,58 @@ +@@ -55759,58 +55678,58 @@ #. Print an error if the procedure is defined multiple times; we have to #. exclude references to the same procedure via module association or #. multiple checks for the same procedure. @@ -239282,7 +251454,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Implied SAVE for module variable %qs at %L, needed due to the default initialization" msgstr "" -@@ -55817,425 +55870,425 @@ +@@ -55817,425 +55736,425 @@ #. The shape of a main program or module array needs to be #. constant. @@ -239792,7 +251964,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "NAMELIST object %qs in namelist %qs at %L with ALLOCATABLE or POINTER components" msgstr "" -@@ -56242,400 +56295,400 @@ +@@ -56242,400 +56161,400 @@ #. FIXME: Once UDDTIO is implemented, the following can be #. removed. @@ -240272,7 +252444,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Contained procedure %qs at %L of a PURE procedure must also be PURE" msgstr "" -@@ -56667,49 +56720,49 @@ +@@ -56667,49 +56586,49 @@ msgid "!$OMP at %C starts a commented line as it neither is followed by a space nor is a continuation line" msgstr "" @@ -240331,7 +252503,7 @@ Index: gcc/po/da.po #, fuzzy, gcc-internal-format #| msgid "can't open output file `%s'" msgid "Can't open file %qs" -@@ -56979,54 +57032,54 @@ +@@ -56979,54 +56898,54 @@ msgid "Reshaped array too large at %C" msgstr "" @@ -240396,7 +252568,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Character %qs in string at %L cannot be converted into character kind %d" msgstr "" -@@ -57105,322 +57158,328 @@ +@@ -57105,322 +57024,328 @@ msgid "Namelist group name at %L cannot have the SAVE attribute" msgstr "" @@ -240787,7 +252959,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "Symbol %qs is used before it is typed at %L" msgstr "" -@@ -57692,7 +57751,7 @@ +@@ -57692,7 +57617,7 @@ msgid "Bad IO basetype (%d)" msgstr "" @@ -240796,7 +252968,7 @@ Index: gcc/po/da.po #, gcc-internal-format msgid "gfc_trans_omp_workshare(): Bad statement code" msgstr "" -@@ -59339,6 +59398,9 @@ +@@ -59339,6 +59264,9 @@ msgid "creating selector for nonexistent method %qE" msgstr "opretter vælger for ikke-eksisterende metode '%s'" @@ -240806,6 +252978,19 @@ Index: gcc/po/da.po #, fuzzy #~| msgid "Specify the name of the target architecture" #~ msgid "-march=ARCH Select target architecture" +@@ -64189,12 +64117,6 @@ + #~ msgid "fp_offset (%ld) or end_offset (%ld) is less than zero" + #~ msgstr "fp_offset (%ld) eller end_offset (%ld) er mindre end nul" + +-#~ msgid "Trap on integer divide overflow" +-#~ msgstr "Forårsag undtagelse ved heltalsdivisionsoverløb" +- +-#~ msgid "Don't trap on integer divide overflow" +-#~ msgstr "Forårsag ikke undtagelse ved heltalsdivisionsoverløb" +- + #~ msgid "Use mips16 entry/exit psuedo ops" + #~ msgstr "Benyt MIPS16-indtrædelse-/afslutningspseudooperationer" + Index: gcc/po/tr.po =================================================================== --- a/src/gcc/po/tr.po (.../tags/gcc_5_2_0_release) @@ -520740,6 +532925,56 @@ Index: gcc/graphite-sese-to-poly.c } /* Returns true when PHI contains an argument ARG. */ +Index: gcc/combine.c +=================================================================== +--- a/src/gcc/combine.c (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/combine.c (.../branches/gcc-5-branch) +@@ -11960,14 +11960,15 @@ + continue; + } + +- /* If this is (and:M1 (subreg:M2 X 0) (const_int C1)) where C1 ++ /* If this is (and:M1 (subreg:M1 X:M2 0) (const_int C1)) where C1 + fits in both M1 and M2 and the SUBREG is either paradoxical + or represents the low part, permute the SUBREG and the AND + and try again. */ +- if (GET_CODE (XEXP (op0, 0)) == SUBREG) ++ if (GET_CODE (XEXP (op0, 0)) == SUBREG ++ && CONST_INT_P (XEXP (op0, 1))) + { +- unsigned HOST_WIDE_INT c1; + tmode = GET_MODE (SUBREG_REG (XEXP (op0, 0))); ++ unsigned HOST_WIDE_INT c1 = INTVAL (XEXP (op0, 1)); + /* Require an integral mode, to avoid creating something like + (AND:SF ...). */ + if (SCALAR_INT_MODE_P (tmode) +@@ -11977,18 +11978,22 @@ + have a defined value due to the AND operation. + However, if we commute the AND inside the SUBREG then + they no longer have defined values and the meaning of +- the code has been changed. */ ++ the code has been changed. ++ Also C1 should not change value in the smaller mode, ++ see PR67028 (a positive C1 can become negative in the ++ smaller mode, so that the AND does no longer mask the ++ upper bits). */ + && (0 + #ifdef WORD_REGISTER_OPERATIONS + || (mode_width > GET_MODE_PRECISION (tmode) +- && mode_width <= BITS_PER_WORD) ++ && mode_width <= BITS_PER_WORD ++ && trunc_int_for_mode (c1, tmode) == (HOST_WIDE_INT) c1) + #endif + || (mode_width <= GET_MODE_PRECISION (tmode) + && subreg_lowpart_p (XEXP (op0, 0)))) +- && CONST_INT_P (XEXP (op0, 1)) + && mode_width <= HOST_BITS_PER_WIDE_INT + && HWI_COMPUTABLE_MODE_P (tmode) +- && ((c1 = INTVAL (XEXP (op0, 1))) & ~mask) == 0 ++ && (c1 & ~mask) == 0 + && (c1 & ~GET_MODE_MASK (tmode)) == 0 + && c1 != mask + && c1 != GET_MODE_MASK (tmode)) Index: gcc/config/alpha/alpha.c =================================================================== --- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_5_2_0_release) @@ -521164,7 +533399,26 @@ Index: gcc/config/i386/i386.c return chkp_function_instrumented_p (current_function_decl); /* Complex values are returned in %st(0)/%st(1) pair. */ -@@ -50335,6 +50336,14 @@ +@@ -25140,7 +25141,8 @@ + dst = change_address (dst, BLKmode, destreg); + set_mem_align (dst, desired_align * BITS_PER_UNIT); + epilogue_size_needed = 0; +- if (need_zero_guard && !min_size) ++ if (need_zero_guard ++ && min_size < (unsigned HOST_WIDE_INT) size_needed) + { + /* It is possible that we copied enough so the main loop will not + execute. */ +@@ -25272,7 +25274,7 @@ + max_size -= align_bytes; + } + if (need_zero_guard +- && !min_size ++ && min_size < (unsigned HOST_WIDE_INT) size_needed + && (count < (unsigned HOST_WIDE_INT) size_needed + || (align_bytes == 0 + && count < ((unsigned HOST_WIDE_INT) size_needed +@@ -50335,6 +50337,14 @@ unsigned int size = INTVAL (operands[1]); unsigned int pos = INTVAL (operands[2]); @@ -521179,7 +533433,7 @@ Index: gcc/config/i386/i386.c if (GET_CODE (dst) == SUBREG) { pos += SUBREG_BYTE (dst) * BITS_PER_UNIT; -@@ -50341,9 +50350,6 @@ +@@ -50341,9 +50351,6 @@ dst = SUBREG_REG (dst); } @@ -521189,7 +533443,7 @@ Index: gcc/config/i386/i386.c switch (GET_MODE (dst)) { case V16QImode: -@@ -50391,6 +50397,10 @@ +@@ -50391,6 +50398,10 @@ return false; } @@ -521200,7 +533454,7 @@ Index: gcc/config/i386/i386.c rtx d = dst; if (GET_MODE (dst) != dstmode) d = gen_reg_rtx (dstmode); -@@ -51516,7 +51526,7 @@ +@@ -51516,7 +51527,7 @@ static unsigned HOST_WIDE_INT ix86_memmodel_check (unsigned HOST_WIDE_INT val) { @@ -521209,7 +533463,7 @@ Index: gcc/config/i386/i386.c bool strong; if (val & ~(unsigned HOST_WIDE_INT)(IX86_HLE_ACQUIRE|IX86_HLE_RELEASE -@@ -51527,14 +51537,14 @@ +@@ -51527,14 +51538,14 @@ "Unknown architecture specific memory model"); return MEMMODEL_SEQ_CST; } @@ -522111,6 +534365,28 @@ Index: gcc/config/arm/sync.md expand_mem_thread_fence (model); DONE; }) +Index: gcc/config/arm/arm.md +=================================================================== +--- a/src/gcc/config/arm/arm.md (.../tags/gcc_5_2_0_release) ++++ b/src/gcc/config/arm/arm.md (.../branches/gcc-5-branch) +@@ -5415,7 +5415,7 @@ + if (!REG_P (operands[0])) + operands[1] = force_reg (DImode, operands[1]); + } +- if (REG_P (operands[0]) && REGNO (operands[0]) < FIRST_VIRTUAL_REGISTER ++ if (REG_P (operands[0]) && REGNO (operands[0]) <= LAST_ARM_REGNUM + && !HARD_REGNO_MODE_OK (REGNO (operands[0]), DImode)) + { + /* Avoid LDRD's into an odd-numbered register pair in ARM state +@@ -5434,7 +5434,7 @@ + gen_highpart (SImode, operands[1])); + DONE; + } +- else if (REG_P (operands[1]) && REGNO (operands[1]) < FIRST_VIRTUAL_REGISTER ++ else if (REG_P (operands[1]) && REGNO (operands[1]) <= LAST_ARM_REGNUM + && !HARD_REGNO_MODE_OK (REGNO (operands[1]), DImode)) + { + /* Avoid STRD's from an odd-numbered register pair in ARM state Index: gcc/config/pa/pa.md =================================================================== --- a/src/gcc/config/pa/pa.md (.../tags/gcc_5_2_0_release) @@ -522529,7 +534805,12 @@ Index: libgfortran/ChangeLog =================================================================== --- a/src/libgfortran/ChangeLog (.../tags/gcc_5_2_0_release) +++ b/src/libgfortran/ChangeLog (.../branches/gcc-5-branch) -@@ -1,3 +1,9 @@ +@@ -1,3 +1,14 @@ ++2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> ++ ++ PR libfortran/66936 ++ * io/unix.c (__MINGW32__): Undefine HAVE_UMASK. ++ +2015-07-29 Uros Bizjak <ubizjak@gmail.com> + + PR libgfortran/66650 @@ -522553,6 +534834,23 @@ Index: libgfortran/libgfortran.h #define GFC_DTYPE_TYPE_SIZE_MASK (GFC_DTYPE_SIZE_MASK | GFC_DTYPE_TYPE_MASK) #define GFC_DTYPE_TYPE_SIZE(desc) ((desc)->dtype & GFC_DTYPE_TYPE_SIZE_MASK) +Index: libgfortran/io/unix.c +=================================================================== +--- a/src/libgfortran/io/unix.c (.../tags/gcc_5_2_0_release) ++++ b/src/libgfortran/io/unix.c (.../branches/gcc-5-branch) +@@ -101,6 +101,12 @@ + } + + #endif /* HAVE_WORKING_STAT */ ++ ++ ++/* On mingw, we don't use umask in tempfile_open(), because it ++ doesn't support the user/group/other-based permissions. */ ++#undef HAVE_UMASK ++ + #endif /* __MINGW32__ */ + + Index: libcpp/po/nl.po =================================================================== --- a/src/libcpp/po/nl.po (.../tags/gcc_5_2_0_release) @@ -522868,3 +535166,266 @@ Index: libcpp/po/sv.po #: expr.c:1331 #, c-format +Index: fixincludes/ChangeLog +=================================================================== +--- a/src/fixincludes/ChangeLog (.../tags/gcc_5_2_0_release) ++++ b/src/fixincludes/ChangeLog (.../branches/gcc-5-branch) +@@ -1,3 +1,16 @@ ++2015-08-14 David Edelsohn <dje.gcc@gmail.com> ++ ++ Backport from mainline. ++ 2015-08-14 David Edelsohn <dje.gcc@gmail.com> ++ ++ * inclhack.def (aix_stdio_inline): New fix. ++ (aix_strtof_const): Limit to *-*-aix*. ++ (aix_sysmachine): Same. ++ (aix_syswait_2): Same. ++ (aix_volatile): Same. ++ * fixincl.x: Regenerated. ++ * test/base/stdio.h [AIX_STDIO_INLINE]: New test. ++ + 2015-07-16 Release Manager + + * GCC 5.2.0 released. +Index: fixincludes/tests/base/stdio.h +=================================================================== +--- a/src/fixincludes/tests/base/stdio.h (.../tags/gcc_5_2_0_release) ++++ b/src/fixincludes/tests/base/stdio.h (.../branches/gcc-5-branch) +@@ -19,6 +19,16 @@ + #endif /* AAB_AIX_STDIO_CHECK */ + + ++#if defined( AIX_STDIO_INLINE_CHECK ) ++#ifdef __cplusplus ++} ++#endif ++ ++#if (defined(__cplusplus) && defined(__IBMCPP__)) ++#ifdef ferror ++#endif /* AIX_STDIO_INLINE_CHECK */ ++ ++ + #if defined( ALPHA_GETOPT_CHECK ) + extern int getopt(int, char *const[], const char *); + #endif /* ALPHA_GETOPT_CHECK */ +Index: fixincludes/fixincl.x +=================================================================== +--- a/src/fixincludes/fixincl.x (.../tags/gcc_5_2_0_release) ++++ b/src/fixincludes/fixincl.x (.../branches/gcc-5-branch) +@@ -1,12 +1,12 @@ + /* -*- buffer-read-only: t -*- vi: set ro: +- * +- * DO NOT EDIT THIS FILE (fixincl.x) +- * +- * It has been AutoGen-ed May 21, 2015 at 02:48:12 AM by AutoGen 5.18.3 +- * From the definitions inclhack.def +- * and the template file fixincl ++ * ++ *DO NOT EDIT THIS FILE (fixincl.x) ++ * ++ *It has been AutoGen-ed August 13, 2015 at 05:25:50 PM by AutoGen 5.18.3 ++ *From the definitions inclhack.def ++ *and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 21 02:48:12 UTC 2015 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Aug 13 17:25:50 UTC 2015 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 229 fixup descriptions. ++ * This file contains 230 fixup descriptions. + * + * See README for more information. + * +@@ -1503,6 +1503,50 @@ + + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * ++ * Description of Aix_Stdio_Inline fix ++ */ ++tSCC zAix_Stdio_InlineName[] = ++ "aix_stdio_inline"; ++ ++/* ++ * File name selection pattern ++ */ ++tSCC zAix_Stdio_InlineList[] = ++ "stdio.h\0"; ++/* ++ * Machine/OS name selection pattern ++ */ ++tSCC* apzAix_Stdio_InlineMachs[] = { ++ "*-*-aix*", ++ (const char*)NULL }; ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zAix_Stdio_InlineSelect0[] = ++ "#ifdef __cplusplus\\\n\ ++}\\\n\ ++\\\n\ ++#ifdef ferror\\\n"; ++ ++#define AIX_STDIO_INLINE_TEST_CT 1 ++static tTestDesc aAix_Stdio_InlineTests[] = { ++ { TT_EGREP, zAix_Stdio_InlineSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Aix_Stdio_Inline ++ */ ++static const char* apzAix_Stdio_InlinePatch[] = { ++ "format", ++ "#ifdef __cplusplus\n\ ++}\n\ ++#endif\n\n\ ++#if (defined(__cplusplus) && defined(__IBMCPP__))\n\ ++#ifdef ferror\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * + * Description of Aix_Strtof_Const fix + */ + tSCC zAix_Strtof_ConstName[] = +@@ -1516,7 +1560,9 @@ + /* + * Machine/OS name selection pattern + */ +-#define apzAix_Strtof_ConstMachs (const char**)NULL ++tSCC* apzAix_Strtof_ConstMachs[] = { ++ "*-*-aix*", ++ (const char*)NULL }; + + /* + * content selection pattern - do fix if pattern found +@@ -1551,7 +1597,9 @@ + /* + * Machine/OS name selection pattern + */ +-#define apzAix_SysmachineMachs (const char**)NULL ++tSCC* apzAix_SysmachineMachs[] = { ++ "*-*-aix*", ++ (const char*)NULL }; + + /* + * content selection pattern - do fix if pattern found +@@ -1586,7 +1634,9 @@ + /* + * Machine/OS name selection pattern + */ +-#define apzAix_Syswait_2Machs (const char**)NULL ++tSCC* apzAix_Syswait_2Machs[] = { ++ "*-*-aix*", ++ (const char*)NULL }; + + /* + * content selection pattern - do fix if pattern found +@@ -1621,7 +1671,9 @@ + /* + * Machine/OS name selection pattern + */ +-#define apzAix_VolatileMachs (const char**)NULL ++tSCC* apzAix_VolatileMachs[] = { ++ "*-*-aix*", ++ (const char*)NULL }; + + /* + * content selection pattern - do fix if pattern found +@@ -9396,9 +9448,9 @@ + * + * List of all fixes + */ +-#define REGEX_COUNT 266 ++#define REGEX_COUNT 267 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 229 ++#define FIX_COUNT 230 + + /* + * Enumerate the fixes +@@ -9435,6 +9487,7 @@ + AIX_STDINT_3_FIXIDX, + AIX_STDINT_4_FIXIDX, + AIX_STDINT_5_FIXIDX, ++ AIX_STDIO_INLINE_FIXIDX, + AIX_STRTOF_CONST_FIXIDX, + AIX_SYSMACHINE_FIXIDX, + AIX_SYSWAIT_2_FIXIDX, +@@ -9791,6 +9844,11 @@ + AIX_STDINT_5_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Stdint_5Tests, apzAix_Stdint_5Patch, 0 }, + ++ { zAix_Stdio_InlineName, zAix_Stdio_InlineList, ++ apzAix_Stdio_InlineMachs, ++ AIX_STDIO_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aAix_Stdio_InlineTests, apzAix_Stdio_InlinePatch, 0 }, ++ + { zAix_Strtof_ConstName, zAix_Strtof_ConstList, + apzAix_Strtof_ConstMachs, + AIX_STRTOF_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, +Index: fixincludes/inclhack.def +=================================================================== +--- a/src/fixincludes/inclhack.def (.../tags/gcc_5_2_0_release) ++++ b/src/fixincludes/inclhack.def (.../branches/gcc-5-branch) +@@ -892,10 +892,32 @@ + }; + + /* ++ * stdio.h on AIX defines ferror, clearerr and feof as C++ inline, which ++ produces wrong code with G++. ++ */ ++fix = { ++ hackname = aix_stdio_inline; ++ mach = "*-*-aix*"; ++ files = stdio.h; ++ select = "#ifdef __cplusplus\\\n" ++ "}\\\n\\\n" ++ "#ifdef ferror\\\n"; ++ c_fix = format; ++ c_fix_arg = "#ifdef __cplusplus\n" ++ "}\n" ++ "#endif\n\n" ++ "#if (defined(__cplusplus) && defined(__IBMCPP__))\n" ++ "#ifdef ferror\n"; ++ test_text = "#ifdef __cplusplus\n}\n\n#ifdef ferror"; ++}; ++ ++ ++/* + * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument. + */ + fix = { + hackname = aix_strtof_const; ++ mach = "*-*-aix*"; + files = stdlib.h; + select = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);"; + c_fix = format; +@@ -909,6 +931,7 @@ + */ + fix = { + hackname = aix_sysmachine; ++ mach = "*-*-aix*"; + files = sys/machine.h; + select = "\\\\ +\n"; + c_fix = format; +@@ -923,6 +946,7 @@ + */ + fix = { + hackname = aix_syswait_2; ++ mach = "*-*-aix*"; + files = sys/wait.h; + select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)'; + c_fix = format; +@@ -939,6 +963,7 @@ + */ + fix = { + hackname = aix_volatile; ++ mach = "*-*-aix*"; + files = sys/signal.h; + select = "typedef volatile int sig_atomic_t"; + c_fix = format; diff --git a/debian/rules.patch b/debian/rules.patch index b5420cc..8bf488a 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -88,7 +88,6 @@ debian_patches += \ go-escape-analysis6 \ gccgo-sendfile-fix \ pr66368 \ - pr66857 \ gcc-sh-bootstrap-ignore \ ifeq ($(libstdcxx_abi),new) |