public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-8139] libstdc++: Fix misleading typedef name in <format> Date: Sat, 9 Dec 2023 22:04:50 +0000 (GMT) [thread overview] Message-ID: <20231209220450.4B4A13858C2A@sourceware.org> (raw) https://gcc.gnu.org/g:1f10823731394b19b4d2e466b35cdccd18efba37 commit r13-8139-g1f10823731394b19b4d2e466b35cdccd18efba37 Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Dec 7 12:40:18 2023 +0000 libstdc++: Fix misleading typedef name in <format> This local typedef for uintptr_t was accidentally named uint64_t, probably from a careless code completion shortcut. We don't need the typedef at all since it's only used once. Just use __UINTPTR_TYPE__ directly instead. libstdc++-v3/ChangeLog: * include/std/format (_Iter_sink<charT, contiguous_iterator>): Remove uint64_t local type. (cherry picked from commit cab0083dc72dfd22a1b2016b068f9313beb7f091) Diff: --- libstdc++-v3/include/std/format | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index a48bb2e161d..88510ccf60e 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -2587,7 +2587,6 @@ namespace __format requires same_as<iter_value_t<_OutIter>, _CharT> class _Iter_sink<_CharT, _OutIter> : public _Sink<_CharT> { - using uint64_t = __UINTPTR_TYPE__; _OutIter _M_first; iter_difference_t<_OutIter> _M_max = -1; protected: @@ -2646,7 +2645,7 @@ namespace __format return {__ptr, __bytes / sizeof(_CharT)}; #endif // Avoid forming a pointer to a different memory page. - uint64_t __off = reinterpret_cast<uint64_t>(__ptr) % 1024; + const auto __off = reinterpret_cast<__UINTPTR_TYPE__>(__ptr) % 1024; __n = (1024 - __off) / sizeof(_CharT); if (__n > 0) [[likely]] return {__ptr, static_cast<size_t>(__n)};
reply other threads:[~2023-12-09 22:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231209220450.4B4A13858C2A@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@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: linkBe 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).