I use tcc as a part of a numerical framework on Windows.
I can confirm that:
- sinf does not work
- some math functions (not just limited to sin) do not announce as undeclared when math.h is missing. Instead these undeclared math functions return strange values. In my case, sin(1.0) returns 639.0 when math.h is missing. Apart from a wrong return value, the framework malfunctions (following function calls are unpredictable), suggesting that the memory is messed up.
Indeed sizeof sin(1.0) is 8 when math.h is included and 4 when it is not (which should correspond to float). My best guess is that printf tries to display a 4 byte as an 8 byte value, hence the wrong output (and memory mess-up). This is indeed toxic and requires a fix, and I hope a qualified someone is able to resolve this issue.
~Mads