[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] patch for bug compiling GSL 1.4 with HP/UX (PA-RISC) cc
From: |
Steven G. Johnson |
Subject: |
[Bug-gsl] patch for bug compiling GSL 1.4 with HP/UX (PA-RISC) cc |
Date: |
Thu, 5 Feb 2004 21:33:16 -0500 (EST) |
Hi, compilation of GSL 1.4 failed on the abovementioned system, with:
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I..
+O3 +Oall +Optrs_ansi -c -o gauss.lo `test -f 'gauss.c' || echo
'./'`gauss.c
rm -f .libs/gauss.lo
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. +O3 +Oall +Optrs_ansi -c gauss.c +Z
-DPIC -o .libs/gauss.lo
cc: "gauss.c", line 317: error 1560: Modifiable lvalue required with
operator "--".
cc: "gauss.c", line 317: error 1563: Expression in if must be scalar.
gmake: *** [gauss.lo] Error 1
It doesn't like the expression -GAUSS_XLOWER in cdf/gauss.c, apparently
because this expands to --37.519. I'm not sure if this is ANSI behavior
or not, but to be safe you should always parenthesize your constants.
e.g. at the top of cdf/gauss.c
#define GAUSS_EPSILON (GSL_DBL_EPSILON / 2)
#define GAUSS_XUPPER (8.572)
#define GAUSS_XLOWER (-37.519)
#define GAUSS_SCALE (16.0)
With this change, GSL compiles successfully.
Apologies if this has already been reported/fixed.
Cordially,
Steven G. Johnson
- [Bug-gsl] patch for bug compiling GSL 1.4 with HP/UX (PA-RISC) cc,
Steven G. Johnson <=