* Missing declarations of long complex double transcendental functions in complex.h
@ 2020-08-28 16:09 Ian Abbott
0 siblings, 0 replies; only message in thread
From: Ian Abbott @ 2020-08-28 16:09 UTC (permalink / raw)
To: newlib
This problem came up on stackoverflow.com in a question about using
cos() from <tgmath.h> using newlib 3.3.0 and arm-none-eabi-gcc 9.2.1.
See https://stackoverflow.com/q/63632989/5264491
test.c:
#include <tgmath.h>
void test()
{
double x=cos(4.5);
}
$ arm-none-eabi-gcc -c test.c
In file included from test.c:1:
test.c: In function 'test':
test.c:5:14: error: 'ccosl' undeclared (first use in this function); did
you mean 'ccosh'?
5 | double x=cos(4.5);
| ^~~
test.c:5:14: note: each undeclared identifier is reported only once for
each function it appears in
test.c:5:14: error: argument 6 of '__builtin_tgmath' is not a function
pointer
It seems to be because various functions in <complex.h> are only
declared if the '__CYGWIN__' macro is defined. Note that for
arm-none-eabi, the '_LDBL_EQ_DBL' macro is defined in <newlib.h>.
Best regards,
Ian Abbott
--
-=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268. Registered address: )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-28 16:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 16:09 Missing declarations of long complex double transcendental functions in complex.h Ian Abbott
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).