On 07/13/10 09:53 AM, Stathis Kamperis wrote:
Hi

tgmath.h is C99, and you're compiling as C89 (-ansi). Try -std=c99 instead of 
-ansi, or stick to C89 features. Your code might compile on Linux,
since on that platform C89, C99, C++ and in fact most standards are all rather 
a blur.

Yes, you are right. But it doesn't make any difference:

Not for the bundled gcc 3.4.3 (package name gcc-3) but it does work for
gcc 4.3.3 (package name gcc-43):

$ /usr/bin/gcc tgmath.c -lm -Wall -W -ansi -pedantic
tgmath.c: In function `main':
tgmath.c:6: warning: implicit declaration of function `__tgmath_cos'
Undefined                       first referenced
 symbol                             in file
__tgmath_cos                        /var/tmp//cccxaqop.o
ld: fatal: symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
$

$ /usr/gcc/4.3/bin/gcc tgmath.c -lm -Wall -W -ansi -pedantic
tgmath.c: In function ‘main’:
tgmath.c:6: warning: implicit declaration of function ‘cosl’
tgmath.c:6: warning: implicit declaration of function ‘cosf’
$
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to