[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 22 20:49:55 PST 2022


sepavloff added a comment.

In D134859#3943926 <https://reviews.llvm.org/D134859#3943926>, @tbaeder wrote:

> FYI, I noticed the way the floating values are serialized doesn't work if the `APFloat` heap-allocated anything; those values aren't preserved through (de)serialization of course.
>
> Reproducer:
>
>   constexpr double foo() {
>     return __LDBL_MIN__;
>   }

The return statement returns a value of type `long double` while the function returns `double`. If `long double` is wider than `double`, truncation occurs, may be this is the reason?


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

https://reviews.llvm.org/D134859



More information about the cfe-commits mailing list