public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: newlib@sourceware.org.
Subject: Missing declarations of long complex double transcendental functions in complex.h
Date: Fri, 28 Aug 2020 17:09:43 +0100	[thread overview]
Message-ID: <e31b571a-07af-54a1-ef31-c2ce5941e0b6@mev.co.uk> (raw)

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. )=-

                 reply	other threads:[~2020-08-28 16:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e31b571a-07af-54a1-ef31-c2ce5941e0b6@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=newlib@sourceware.org. \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).