diff --git a/inc/std.h b/inc/std.h index 8aeada2..79a8dcc 100644 --- a/inc/std.h +++ b/inc/std.h @@ -23,7 +23,7 @@ #include #include #include -#include +// #include #include #include #include diff --git a/test/math.c b/test/math.c index 4137bdd..1b8d661 100644 --- a/test/math.c +++ b/test/math.c @@ -1,11 +1,5 @@ -#include -#include -#include -#include -#include -#include -#include +#include const char *show_classification(double x) { switch(fpclassify(x)) { diff --git a/todo b/todo index dc5a6e9..8518f61 100644 --- a/todo +++ b/todo @@ -72,6 +72,16 @@ string.h: * strerror_s * strerrorlen_s +tgmath.h: +* Due to the use of conditional operator in type-generic macros the + expression always expands to the value of type `long double`. This leads + to warnings when used with printf, e.g. as in printf("%f\n", exp(0)). + Using _Generic macros isn't a good choice either, because it won't work + with typedef'd types. + In other words there's no pure-C way to do tgmath.h. + That's probably the reason msvc stdlib headers don't implement tgmath.h. + clang implements it with __attribute__((__overloadable__)). + threads.h: * TODO: add todo items