Re: libm/gamma.c

Nikola Vladov <[email protected]>
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
On Thu, Aug 27, 2009 at 03:11:15PM +0200, Felix von Leitner wrote:
> What kind of problem do you have?
> 
> The conversion should be implicit and compile just fine (it does for me
> on ppc64).

pmarinov@bgpfen [/tmp/dietlibc] Thu Aug 27 > 16:37:29 $ make
gcc -m64 -D__dietlibc__ -I. -isystem include -pipe -nostdinc -Os -mpowerpc64 -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls -c libm/gamma.c -o bin-ppc64/gamma.o -D__dietlibc__
libm/gamma.c:50: error: initializer element is not constant
libm/gamma.c:50: error: (near initialization for 'coeff[2]')
libm/gamma.c:50: error: initializer element is not constant
libm/gamma.c:50: error: (near initialization for 'coeff[3]')
libm/gamma.c:50: error: initializer element is not constant
libm/gamma.c:50: error: (near initialization for 'coeff[4]')
...

I have changed BO and B1 and no error for them!


#include <math.h>

#define B0   (double)   +            1.0l/   6/ 1/ 2
#define B1   (double)   -            1.0l/  30/ 3/ 4
#define B2      +            1.0l/  42/ 5/ 6
#define B3      -            1.0l/  30/ 7/ 8

pmarinov@bgpfen [/tmp/dietlibc] $ gcc --version
gcc (GCC) 4.1.2 20070115 (prerelease) (SUSE Linux)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pmarinov@bgpfen [/tmp/dietlibc] $ ldd --version
ldd (GNU libc) 2.4
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Nikola

PS.  I don't have root access on this host!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.