public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-6352] libstdc++: Have std::addressof use __builtin_addressof
@ 2024-12-18 20:55 Francois Dumont
0 siblings, 0 replies; only message in thread
From: Francois Dumont @ 2024-12-18 20:55 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:33502a11e47a87f1423a80bead8e87fbd6363fa1
commit r15-6352-g33502a11e47a87f1423a80bead8e87fbd6363fa1
Author: François Dumont <frs.dumont@gmail.com>
Date: Wed Dec 18 19:18:32 2024 +0100
libstdc++: Have std::addressof use __builtin_addressof
Rather than calling std::__addressof in std::addressof we can directly
call __builtin_addressof to bypass 1 function call.
libstdc++-v3/ChangeLog:
* include/bits/move.h (std::addressof): Call __builtin_addressof.
Diff:
---
libstdc++-v3/include/bits/move.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h
index 8397a01b6323..421e37509eae 100644
--- a/libstdc++-v3/include/bits/move.h
+++ b/libstdc++-v3/include/bits/move.h
@@ -161,7 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_NODISCARD
inline _GLIBCXX17_CONSTEXPR _Tp*
addressof(_Tp& __r) noexcept
- { return std::__addressof(__r); }
+ { return __builtin_addressof(__r); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2598. addressof works on temporaries
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-18 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-18 20:55 [gcc r15-6352] libstdc++: Have std::addressof use __builtin_addressof Francois Dumont
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).