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 r11-8567] libstdc++: Use reserved name for attribute [PR101055]
Date: Mon, 14 Jun 2021 12:16:26 +0000 (GMT) [thread overview]
Message-ID: <20210614121626.2D35B3857C66@sourceware.org> (raw)
https://gcc.gnu.org/g:c4f1bbed3d0184955d39adf0be287667891baf83
commit r11-8567-gc4f1bbed3d0184955d39adf0be287667891baf83
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jun 14 10:58:15 2021 +0100
libstdc++: Use reserved name for attribute [PR101055]
The no_unique_address attribute is not a reserved name until C++20, so
to use it in C++11/14/17 modes we should use the __no_unique_address_
form. We already use that form when using the attribute, but not in the
__has_cpp_attribute check.
libstdc++-v3/ChangeLog:
PR libstdc++/101055
* include/std/tuple: Use reserved form of attribute name.
* testsuite/17_intro/headers/c++2011/all_attributes.cc: Add
check for no_unique_address.
* testsuite/17_intro/headers/c++2014/all_attributes.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/all_attributes.cc:
Likewise.
(cherry picked from commit 917efba2dd4ff34336d0d3aa55285ae22503e4aa)
Diff:
---
libstdc++-v3/include/std/tuple | 2 +-
| 1 +
| 1 +
| 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 3b771c50b25..2d562f8da77 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool = __empty_not_final<_Head>::value>
struct _Head_base;
-#if __has_cpp_attribute(no_unique_address)
+#if __has_cpp_attribute(__no_unique_address__)
template<size_t _Idx, typename _Head>
struct _Head_base<_Idx, _Head, true>
{
--git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
index c5c94ad7702..c38fc7d4d84 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
@@ -28,6 +28,7 @@
# define deprecated 1
# define visibility 1
#endif
+#define no_unique_address 1
#define packed 1
#define pure 1
// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
--git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index c8f036219ff..65d273db19c 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -28,6 +28,7 @@
# define deprecated 1
# define visibility 1
#endif
+#define no_unique_address 1
#define packed 1
#define pure 1
// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
--git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
index c4e38d6423a..811b3fe3613 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
@@ -26,6 +26,7 @@
# define cold 1
# define visibility 1
#endif
+#define no_unique_address 1
#define packed 1
#define pure 1
// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
reply other threads:[~2021-06-14 12:16 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=20210614121626.2D35B3857C66@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: 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).