This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using 'complex.h' and GCC-3.4.4-3 in Cygwin

On 2007-07-26 10:16Z, Angelo Graziosi wrote:
> On Cygwin, gcc-3.4.4-3 (curr) fails to compile this simple test case
> $ gcc test_complex_h.c
> test_complex_h.c:3:21: complex.h: No such file or directory

I suppose newlib doesn't provide a full C99 implementation yet.
This message would seem to confirm that:

> test_complex_h.c: In function `main':
> test_complex_h.c:8: error: parse error before "complex"

If you change that line this way:

- printf("sizeof(%s) = %ld\n",   "complex float", sizeof(float complex));
+ printf("sizeof(%s) = %ld\n",   "complex float", sizeof(float _Complex));

then it compiles, and running it gives
  sizeof(complex float) = 8
so gcc has some support built in, though the C library doesn't
implement the macro defined in C99 7.3.1/2 . It seems to be
lacking the complex functions, too: I get
  undefined reference to `_cexpf'
if I try to use cexpf() by providing my own prototype.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]