public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Rainer Orth <ro@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-7476] libstdc++: Don't use reserved identifiers in simd headers Date: Wed, 3 Mar 2021 12:21:06 +0000 (GMT) [thread overview] Message-ID: <20210303122106.5600F3851C0A@sourceware.org> (raw) https://gcc.gnu.org/g:a7267237371cc978fa6e0485446af11c60e4b102 commit r11-7476-ga7267237371cc978fa6e0485446af11c60e4b102 Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Wed Mar 3 13:16:35 2021 +0100 libstdc++: Don't use reserved identifiers in simd headers Two simd tests FAIL on Solaris, both SPARC and x86: FAIL: experimental/simd/standard_abi_usable.cc -msse2 -O2 -Wno-psabi (test for excess errors) FAIL: experimental/simd/standard_abi_usable_2.cc -msse2 -O2 -Wno-psabi (test for excess errors) This happens because the simd headers use identifiers documented in the libstdc++ manual as reserved by system headers. Fixed as follows, tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2021-02-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libstdc++-v3: * include/experimental/bits/simd.h: Replace reserved _X, _B by _Xp, _Bp. * include/experimental/bits/simd_builtin.h: Likewise. * include/experimental/bits/simd_x86.h: Likewise. Diff: --- libstdc++-v3/include/experimental/bits/simd.h | 12 ++++++------ libstdc++-v3/include/experimental/bits/simd_builtin.h | 4 ++-- libstdc++-v3/include/experimental/bits/simd_x86.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index c452778832f..59ddf3cc958 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -201,8 +201,8 @@ template <size_t _Np> inline constexpr overaligned_tag<_Np> overaligned = {}; // }}} -template <size_t _X> - using _SizeConstant = integral_constant<size_t, _X>; +template <size_t _Xp> + using _SizeConstant = integral_constant<size_t, _Xp>; namespace __detail { @@ -4208,11 +4208,11 @@ template <template <int> class _A0, template <int> class... _Rest> return typename __decay_abi<_A0<_Bytes>>::type{}; else { - using _B = + using _Bp = typename __find_next_valid_abi<_A0, _Bytes, _Tp>::type; - if constexpr (_B::template _S_is_valid_v< - _Tp> && _B::template _S_size<_Tp> <= _Np) - return _B{}; + if constexpr (_Bp::template _S_is_valid_v< + _Tp> && _Bp::template _S_size<_Tp> <= _Np) + return _Bp{}; else return typename _AbiList<_Rest...>::template _BestAbi<_Tp, _Np>{}; diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc++-v3/include/experimental/bits/simd_builtin.h index 7f728a10488..e986ee91620 100644 --- a/libstdc++-v3/include/experimental/bits/simd_builtin.h +++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h @@ -894,12 +894,12 @@ template <typename _Tp, typename _Mp, typename _Abi, size_t _Np> class _SimdCastType2 { using _Ap = __intrinsic_type_t<_Tp, _Np>; - using _B = __vector_type_t<_Tp, _Np>; + using _Bp = __vector_type_t<_Tp, _Np>; _SimdMember _M_data; public: _SimdCastType2(_Ap __a) : _M_data(__vector_bitcast<_Tp>(__a)) {} - _SimdCastType2(_B __b) : _M_data(__b) {} + _SimdCastType2(_Bp __b) : _M_data(__b) {} operator _SimdMember() const { return _M_data; } }; diff --git a/libstdc++-v3/include/experimental/bits/simd_x86.h b/libstdc++-v3/include/experimental/bits/simd_x86.h index 74824873734..305d7a9fa54 100644 --- a/libstdc++-v3/include/experimental/bits/simd_x86.h +++ b/libstdc++-v3/include/experimental/bits/simd_x86.h @@ -55,10 +55,10 @@ template <typename _TV, // }}} // __interleave128_lo {{{ -template <typename _Ap, typename _B, typename _Tp = common_type_t<_Ap, _B>, +template <typename _Ap, typename _Bp, typename _Tp = common_type_t<_Ap, _Bp>, typename _Trait = _VectorTraits<_Tp>> _GLIBCXX_SIMD_INTRINSIC constexpr _Tp - __interleave128_lo(const _Ap& __av, const _B& __bv) + __interleave128_lo(const _Ap& __av, const _Bp& __bv) { const _Tp __a(__av); const _Tp __b(__bv);
reply other threads:[~2021-03-03 12:21 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=20210303122106.5600F3851C0A@sourceware.org \ --to=ro@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).