bjope added a comment.

Looked around a bit.

- Seems like in GNU libc they use an internal `__GLIBC_FLT_EVAL_METHOD` that is 
set to 2 if `__FLT_EVAL_METHOD__` is -1   
(https://sourceware.org/git/?p=glibc.git;a=blob;f=bits/flt-eval-method.h;hb=f60e45ba10f0ca2794318de95720cdbdb6ff20d0).
- In LLVM:s libc I do not see anything like that, instead there is an `#error` 
if `__FLT_EVAL_METHOD__` is -1  
(https://github.com/llvm/llvm-project/blob/main/libc/include/llvm-libc-types/float_t.h).
- Looking at newlib it seem to do nothing for `__FLT_EVAL_METHOD__` equal to 
-1, although it has some comments about "Assume float_t and double_t have been 
defined previously for this configuration (e.g. config.h)"  
(https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=799ac494adc3f134a8f63a06397e833ec89c644a;hb=HEAD#l169)

So maybe I need to patch our newlib version somehow to make sure float_t is 
defined even for -1. But there could be problems with the LLVM libc 
implementation of math.h (which I think uses float_t.h).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121122

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to