From: Bruno Haible Date: Sun, 25 Mar 2007 19:45:26 +0000 (+0000) Subject: Work around DEC C 6.4 compiler bug. X-Git-Tag: cvs-readonly~676 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=d2c57e54a1f805be7c7859f12962a3804a4a635d;p=gnulib.git Work around DEC C 6.4 compiler bug. --- diff --git a/ChangeLog b/ChangeLog index b9461d7e3..ff4bf3c48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-03-25 Bruno Haible + * lib/isnan.c (FUNC): Work around a DEC C compiler bug. + +2007-03-25 Bruno Haible + * lib/glob_.h: Include . Avoids warnings on AIX 5.1. 2007-03-25 Bruno Haible diff --git a/lib/isnan.c b/lib/isnan.c index 9b6ec87b4..6ae17784d 100644 --- a/lib/isnan.c +++ b/lib/isnan.c @@ -64,11 +64,14 @@ FUNC (DOUBLE x) because x may be a signaling NaN. */ # if defined __SUNPRO_C || defined __DECC /* The Sun C 5.0 compilers and the Compaq (ex-DEC) 6.4 compilers don't - recognize the initializers as constant expressions. */ + recognize the initializers as constant expressions. The latter compiler + also fails when constant-folding 0.0 / 0.0 even when constant-folding is + not required. */ + static DOUBLE zero = L_(0.0); memory_double nan; DOUBLE plus_inf = L_(1.0) / L_(0.0); DOUBLE minus_inf = -L_(1.0) / L_(0.0); - nan.value = L_(0.0) / L_(0.0); + nan.value = zero / zero; # else static memory_double nan = { L_(0.0) / L_(0.0) }; static DOUBLE plus_inf = L_(1.0) / L_(0.0);