Cygwin 3.3.1 tgmath.h plus log10() gives "error: no matching function for type-generic call"
Mon Nov 8 23:33:51 GMT 2021
Following up; this was in fact caused by what looks like a change in more-recent GCC, where tgmath.h has stopped working transparently with log10 on complex values. This is more in line with the C99 standard, but caused the problems outlined below. We have now worked around this in PDL, and the new version (2.060) now works fine on Cygwin again according to our CI.
Sorry to have troubled you all!
Dear Cygwin folks,
As shown in this run of PDL (Perl Data Language)’s CI, our new use of tgmath.h is causing a problem with log10:
The error is:
In file included from pp-log10.c:56:
1744<https://github.com/PDLPorters/pdl/runs/4134966240?check_suite_focus=true#step:11:1744>ops.pd: In function ‘pdl_log10_readdata’:
1745<https://github.com/PDLPorters/pdl/runs/4134966240?check_suite_focus=true#step:11:1745>ops.pd:321:35: error: no matching function for type-generic call
The line numbers aren’t directly meaningful due to my enthusiastic use of #line in the project, but I believe the error is triggered by calling log10() with an unsigned char. This appears to work fine on GCC on Linux (and Windows, and with clang on MacOS).
I tried for some time to find out which versions of GCC, glibc etc Cygwin 3.3.1 includes, and was unsuccessful. The best I could see was that the Choco package seems to also include “[Cygwin] 11 install gcc-core 11.2.0-1”.
Any pointers (ha!) gratefully received.
More information about the Cygwin