From: Eric Blake Date: Thu, 4 Nov 2010 22:40:41 +0000 (-0600) Subject: isnanl: work around icc bug X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37059fdaaacaaa2e4c03f1768f919186f5f263c4;p=pspp isnanl: work around icc bug * lib/isnan.c (FUNC): Compute run-time NaN under ICC as well. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 68c0a75846..0ef0c276ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-04 Eric Blake + + isnanl: work around icc bug + * lib/isnan.c (FUNC): Compute run-time NaN under ICC as well. + 2010-11-03 Eric Blake tests: fix compiler warnings diff --git a/lib/isnan.c b/lib/isnan.c index ddad7fbfe4..d183ac478b 100644 --- a/lib/isnan.c +++ b/lib/isnan.c @@ -118,8 +118,8 @@ FUNC (DOUBLE x) /* Be careful to not do any floating-point operation on x, such as x == x, because x may be a signaling NaN. */ # if defined __TINYC__ || defined __SUNPRO_C || defined __DECC \ - || (defined __sgi && !defined __GNUC__) - /* The Sun C 5.0 compilers and the Compaq (ex-DEC) 6.4 compilers don't + || (defined __sgi && !defined __GNUC__) || defined __ICC + /* The Sun C 5.0, Intel ICC 10.0, and Compaq (ex-DEC) 6.4 compilers don't 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. The SGI MIPSpro C compiler complains about "floating-point