From: Jonathan Wakely <jwakely@redhat.com>
To: "Daniel Krügler" <daniel.kruegler@gmail.com>
Cc: libstdc++ <libstdc++@gcc.gnu.org>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] Implement ISO/IEC TS 18822 C++ File system TS
Date: Fri, 01 May 2015 17:55:00 -0000 [thread overview]
Message-ID: <20150501175540.GH3618@redhat.com> (raw)
In-Reply-To: <CAGNvRgAzHFMbsw3PLzEb4zprmGnZiLJux+vJCxY9kC-gCOhvLg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
On 01/05/15 19:03 +0200, Daniel Krügler wrote:
>- There are three places where you refer to std::__addressof and one
>where you refer to std::addressof. Is this difference intentional?
No, I'll make them all use __addressof.
>- I found all together six non-uglified usages of parameter name "rhs"
>in the synopsis of directory_iterator and
>recursive_directory_iterator.
All names should be uglified as of this patch, which also fixes the
dg-require-filesystem-ts check so the tests actually run again(!)
Tested x86_64-linux and powerpc64le-linux, committed to trunk.
I'll address the other issues ASAP (I'm making a number of changes to
the #else branches in ops.cc and dir.cc).
Thanks very much for the thorough review.
[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 6857 bytes --]
commit 503fb9b4fe01b0c34d47590ed2384db179e04a57
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri May 1 18:41:38 2015 +0100
* include/experimental/fs_dir.h: Fix use of non-reserved names.
* include/experimental/fs_ops.h: Likewise.
* include/experimental/fs_path.h: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Use
C++11 when checking for support.
diff --git a/libstdc++-v3/include/experimental/fs_dir.h b/libstdc++-v3/include/experimental/fs_dir.h
index 0538fd2..d46d41b 100644
--- a/libstdc++-v3/include/experimental/fs_dir.h
+++ b/libstdc++-v3/include/experimental/fs_dir.h
@@ -180,14 +180,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
directory_options __options, error_code& __ec) noexcept
: directory_iterator(__p, __options, &__ec) { }
- directory_iterator(const directory_iterator& rhs) = default;
+ directory_iterator(const directory_iterator& __rhs) = default;
- directory_iterator(directory_iterator&& rhs) noexcept = 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;
+ 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; }
@@ -269,9 +269,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
// modifiers
recursive_directory_iterator&
- operator=(const recursive_directory_iterator& rhs) noexcept;
+ operator=(const recursive_directory_iterator& __rhs) noexcept;
recursive_directory_iterator&
- operator=(recursive_directory_iterator&& rhs) noexcept;
+ operator=(recursive_directory_iterator&& __rhs) noexcept;
recursive_directory_iterator& operator++();
recursive_directory_iterator& increment(error_code& __ec) noexcept;
diff --git a/libstdc++-v3/include/experimental/fs_ops.h b/libstdc++-v3/include/experimental/fs_ops.h
index 0878fbb..6b7d470 100644
--- a/libstdc++-v3/include/experimental/fs_ops.h
+++ b/libstdc++-v3/include/experimental/fs_ops.h
@@ -53,8 +53,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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);
+ 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)
@@ -64,8 +64,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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,
+ 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
@@ -239,12 +239,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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,
+ 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;
+ 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);
diff --git a/libstdc++-v3/include/experimental/fs_path.h b/libstdc++-v3/include/experimental/fs_path.h
index ffc4926..11b0561 100644
--- a/libstdc++-v3/include/experimental/fs_path.h
+++ b/libstdc++-v3/include/experimental/fs_path.h
@@ -423,9 +423,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
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);
+ 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;
@@ -681,10 +681,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
iterator operator--(int) { auto __tmp = *this; --_M_cur; return __tmp; }
friend bool operator==(const iterator& __lhs, const iterator& __rhs)
- { return __lhs.equals(__rhs); }
+ { return __lhs._M_equals(__rhs); }
friend bool operator!=(const iterator& __lhs, const iterator& __rhs)
- { return !__lhs.equals(__rhs); }
+ { return !__lhs._M_equals(__rhs); }
private:
friend class path;
@@ -697,7 +697,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
: _M_path(__path), _M_cur(), _M_at_end(__at_end)
{ }
- bool equals(iterator) const;
+ bool _M_equals(iterator) const;
const path* _M_path;
path::_List::const_iterator _M_cur;
@@ -749,7 +749,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
inline path::_Path<_CharT*, _CharT*>&
path::operator+=(_CharT __x)
{
- auto* __addr = std::addressof(__x);
+ auto* __addr = std::__addressof(__x);
return concat(__addr, __addr + 1);
}
@@ -990,7 +990,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
}
inline bool
- path::iterator::equals(iterator __rhs) const
+ path::iterator::_M_equals(iterator __rhs) const
{
if (_M_path != __rhs._M_path)
return false;
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 7ae4f3f..7d8f282 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1896,6 +1896,8 @@ proc check_v3_target_little_endian { } {
}
proc check_v3_target_filesystem_ts { } {
+ global cxxflags
+ global DEFAULT_CXXFLAGS
global et_filesystem_ts
global tool
@@ -1930,7 +1932,11 @@ proc check_v3_target_filesystem_ts { } {
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] {
next prev parent reply other threads:[~2015-05-01 17:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 17:42 Jonathan Wakely
2015-04-30 19:33 ` Jonathan Wakely
[not found] ` <CAFW6PZB9WvskzrKCsNKK4s-5oXWjcwkuZGMrWbrfgJ7fpJiCXQ@mail.gmail.com>
[not found] ` <20150501105351.GY3618@redhat.com>
2015-05-01 19:49 ` Jonathan Wakely
2015-05-02 9:52 ` Jonathan Wakely
2015-05-08 11:43 ` Rainer Orth
2015-05-13 10:56 ` Jonathan Wakely
2015-05-01 12:45 ` Rainer Orth
2015-05-01 15:11 ` Jonathan Wakely
2015-05-01 15:14 ` Rainer Orth
2015-05-01 17:03 ` Daniel Krügler
2015-05-01 17:55 ` Jonathan Wakely [this message]
2015-05-01 18:22 ` Jonathan Wakely
2015-05-01 19:28 ` Daniel Krügler
2015-05-01 19:38 ` Jonathan Wakely
2015-05-01 20:05 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150501175540.GH3618@redhat.com \
--to=jwakely@redhat.com \
--cc=daniel.kruegler@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).