[PATCH] D146148: Float_t and double_t types shouldn't be modified by #pragma clang fp eval_method

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 13:20:16 PDT 2023


zahiraam added a comment.

In D146148#4220495 <https://reviews.llvm.org/D146148#4220495>, @aaron.ballman wrote:

> In D146148#4220433 <https://reviews.llvm.org/D146148#4220433>, @zahiraam wrote:
>
>> In D146148#4220268 <https://reviews.llvm.org/D146148#4220268>, @rjmccall wrote:
>>
>>> Okay, so modifying `math.h` to use this attribute is acceptable?  That's great, that's definitely the best outcome for the compiler.
>>>
>>> Just a minor request about the diagnostic name, but otherwise LGTM.
>>
>> Yes. Added the attribute inside the included math.h header file.
>
> How does this work for, say, glibc, musl, or MSVC CRT? Won't those math.h headers lack the attribute and thus run into problems when used with Clang?

Good point! @rjmccall are you thinking of something in particular with the attribute?
If not I guess we will have to rely on string comparison for all the typedef in the TU. Aaron pointed out the compile time overhead.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146148/new/

https://reviews.llvm.org/D146148



More information about the cfe-commits mailing list