[PATCH] libstdc++: Fix for non-constexpr math_errhandling

Matthias Kretz m.kretz@gsi.de
Wed Jan 19 08:07:55 GMT 2022


Follow-up to my last patch. This one is a more thorough fix. Tested on x86_64-
linux. OK for trunk?

---- 8< ----

Use SFINAE magic to support: "It is unspecified whether math_errhandling
is a macro or an identifier with external linkage." [C Standard]

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	* include/experimental/bits/simd.h (__floating_point_flags): Do
	not rely on math_errhandling to expand to a constant expression.
---
 libstdc++-v3/include/experimental/bits/simd.h | 26 ++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 stdₓ::simd
──────────────────────────────────────────────────────────────────────────
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Fix-for-non-constexpr-math_errhandling.patch
Type: text/x-patch
Size: 1593 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20220119/cf3a4e8b/attachment.bin>


More information about the Libstdc++ mailing list