Eric Wong <[email protected]> wrote:
> This looks like a C99 thing tcc is missing:
>
> https://en.cppreference.com/w/c/types/limits/FLT_EVAL_METHOD.html
> https://en.wikipedia.org/wiki/C99#IEEE_754_floating-point_support
>
> I have several decades of experience in C but managed to mostly
> avoid dealing with floating point all that time, so I'm not sure
> what it should be defined as...
The easiest, laziest option is just
#define FLT_EVAL_METHOD -1
Alternatively, specify it according to tcc's behavior.
I suspect that it is not the same throughout tcc, but I'd say FLT_EVAL_METHOD =
0 is in use, which is what one would do without special consideration.
P.S.
musl defines FLT_EVAL_METHOD in bits/float.h (included by float.h), defaulting
to 0 unless omitted.
tcc does the wrong thing again by including its own header over the libc
headers, an issue that I was already aware of
do 'tcc -E flt.c' to see tcc include its own header instead...
#include <float.h>
int main(void) { int a = FLT_EVAL_METHOD; return a; }
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel