]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Use reserved name for C++20 attribute
authorJonathan Wakely <jwakely@redhat.com>
Mon, 19 Oct 2020 16:57:14 +0000 (17:57 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 19 Oct 2020 17:07:21 +0000 (18:07 +0100)
Although the compiler supports the [[no_unique_address]] attribute, it's
not a reserved name prior to C++20, so we can't use it in std::tuple.
Use [[__no_unique_address__]] instead.

libstdc++-v3/ChangeLog:

* include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
form of __no_unique_address__ attribute because
no_unique_address is not reserved prior to C++20.

libstdc++-v3/include/std/tuple

index 11ad1991108eea6684aaf47708ab0a13d9c6e7ae..adfd6213a1496014042a0dd6ecccc8d8d8a9b9bc 100644 (file)
@@ -122,7 +122,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       static constexpr const _Head&
       _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; }
 
-      [[no_unique_address]] _Head _M_head_impl;
+      [[__no_unique_address__]] _Head _M_head_impl;
     };
 #else
   template<size_t _Idx, typename _Head>