Hello,

In past few months I was seeing some new warnings in our internal CI building
NuttX, so I looked into it more in depth. Initially I thought that the fix would
be pretty simple and thus I submitted it here
https://github.com/apache/nuttx/pull/18480, but since then I did some "just to
be sure" testing on x86 and I found out that `long double` is just one huge
`FIXME`.

Thus I am asking NuttX developers wide, what would be the best way to go around
fixing it. I do not like disabling `long double` for ARM just to workaround that
one function has invalid implementation. On the other hand I am not sure where
should the appropriate sizes for `long double` come from. It is also a bit
against the already existing way the float.h is maintained.

Thus I see two options:

  Use what I initially suggested in the PR and fill in the `FIX ME` defines in
  the float.h. Those have to be conditioned for x86 and x86_64 to have value
  correct for 80bit float and for probably anything else the standard double
  limits.

  The second option is to device `CONFIG_HAVE_LONG_DOUBLE` (yeah I was somewhere
  that it would be good to not call it `CONFIG_` when it is not actually from
  configuration but from compiler.h and I agree) only for x86 and x86_64. I see
  this as more correct but that will disable all long double math functions
  thus code compiling against Linux would not possibly compile against NuttX if
  `long double` would be used. Thus fallback definition redirecting all of these
  functions to the `double` variable would be required.

What do you think?

Thank you for your ideas.
Karel Kočí

Attachment: signature.asc
Description: PGP signature

Reply via email to