[PATCH] libstdc++: Don't use reserved identifiers in simd headers
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Mon Feb 1 12:21:33 GMT 2021
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.
Ok for master?
As an aside, the use of vim: markers initially confused the hell out of
me. As an Emacs user, I rarely use vi for much more than a pager, but
when I wanted to check the lines mentioned in the g++ errors, I had no
idea what was going on or how to disable the folding enabled there:
// vim: foldmethod=marker sw=2 noet ts=8 sts=2 tw=80
I can't help but feel that this is just a personal preference and
doesn't belong into the upstream code.
For avoidance of doubt, I'd consider equivalent Emacs local variables
equally inappropriate.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstdc++-simd-badnames.patch
Type: text/x-patch
Size: 2690 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210201/fea35d27/attachment.bin>
More information about the Libstdc++
mailing list