public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 3.3.1 tgmath.h plus log10() gives "error: no matching function for type-generic call"
@ 2021-11-08  6:31 Ed .
  2021-11-08 23:33 ` Ed .
  0 siblings, 1 reply; 2+ messages in thread
From: Ed . @ 2021-11-08  6:31 UTC (permalink / raw)
  To: cygwin

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:

https://github.com/PDLPorters/pdl/runs/4134966240?check_suite_focus=true

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.

Best regards,
Ed

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Cygwin 3.3.1 tgmath.h plus log10() gives "error: no matching function for type-generic call"
  2021-11-08  6:31 Cygwin 3.3.1 tgmath.h plus log10() gives "error: no matching function for type-generic call" Ed .
@ 2021-11-08 23:33 ` Ed .
  0 siblings, 0 replies; 2+ messages in thread
From: Ed . @ 2021-11-08 23:33 UTC (permalink / raw)
  To: cygwin

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!
Ed


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:

https://github.com/PDLPorters/pdl/runs/4134966240?check_suite_focus=true

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.

Best regards,
Ed


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-08 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08  6:31 Cygwin 3.3.1 tgmath.h plus log10() gives "error: no matching function for type-generic call" Ed .
2021-11-08 23:33 ` Ed .

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).