[PATCH] Remap __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1
Xi Ruoyao
xry111@xry111.site
Thu Mar 9 15:18:25 GMT 2023
On Thu, 2023-03-09 at 22:59 +0800, Kito Cheng wrote:
> Hi Ruoyao:
>
> GCC isn't set that to -1, but clang/LLVM did, see
> https://github.com/llvm/llvm-project/issues/60781 and
> https://reviews.llvm.org/D121122
Hmm, it turns -ffast-math into "-fslow-math" :(.
> Seems like LLVM folks are consider to rever that, but even clang/LLVM
> revert that,
>
> the issue still there: should we treat indeterminable precision as
> evaluating value as long double?
>
> It's almost no benefit for those targets who have 128 bit long double
> type.
I agree that if __FLT_EVAL_METHOD__ is not 0, 1, or 2, and the target
does not have native support for some "special" floating point types, we
*should* make float_t float and double_t double.
But doing so may blow up rolling-release distros: if a library uses
float_t and double_t in the API and the distro maintainers rebuilt the
library with a new Glibc, but (s)he has not rebuilt an application using
the library yet, the application will just crash or produce "strange"
results. Maybe we'll need to issue an alert about this to the distro
maintainers.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
More information about the Libc-alpha
mailing list