From: Matthias Kretz <m.kretz@gsi.de>
To: <gcc-patches@gcc.gnu.org>, <libstdc++@gcc.gnu.org>
Subject: [committed] libstdc++: Protect against macros
Date: Tue, 6 Jun 2023 14:23:37 +0200 [thread overview]
Message-ID: <5732205.e9J7NaK4W3@minbar> (raw)
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
pushed to trunk, will backport later
tested on x86_64-pc-linux-gnu
------- >8 --------
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* include/experimental/bits/simd.h (__bit_cast): Use
__gnu__::__vector_size__ instead of gnu::vector_size.
---
libstdc++-v3/include/experimental/bits/simd.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
──────────────────────────────────────────────────────────────────────────
Dr. Matthias Kretz https://mattkretz.github.io
GSI Helmholtz Centre for Heavy Ion Research https://gsi.de
stdₓ::simd
──────────────────────────────────────────────────────────────────────────
[-- Attachment #2: 0001-libstdc-Protect-against-macros.patch --]
[-- Type: text/x-patch, Size: 1228 bytes --]
diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index 834fe923065..90523ea57dc 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -1743,18 +1743,18 @@ __bit_cast(const _From __x)
return reinterpret_cast<_To>(__x);
else if constexpr (__is_vector_type_v<_To> && __from_is_vectorizable)
{
- using _FV [[gnu::vector_size(sizeof(_From))]] = _From;
+ using _FV [[__gnu__::__vector_size__(sizeof(_From))]] = _From;
return reinterpret_cast<_To>(_FV{__x});
}
else if constexpr (__to_is_vectorizable && __from_is_vectorizable)
{
- using _TV [[gnu::vector_size(sizeof(_To))]] = _To;
- using _FV [[gnu::vector_size(sizeof(_From))]] = _From;
+ using _TV [[__gnu__::__vector_size__(sizeof(_To))]] = _To;
+ using _FV [[__gnu__::__vector_size__(sizeof(_From))]] = _From;
return reinterpret_cast<_TV>(_FV{__x})[0];
}
else if constexpr (__to_is_vectorizable && __is_vector_type_v<_From>)
{
- using _TV [[gnu::vector_size(sizeof(_To))]] = _To;
+ using _TV [[__gnu__::__vector_size__(sizeof(_To))]] = _To;
return reinterpret_cast<_TV>(__x)[0];
}
else
reply other threads:[~2023-06-06 12:23 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=5732205.e9J7NaK4W3@minbar \
--to=m.kretz@gsi.de \
--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).