summaryrefslogtreecommitdiff
path: root/lib/isnan.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-10-15 15:43:57 +0200
committerBen Pfaff <blp@cs.stanford.edu>2010-10-15 09:24:03 -0700
commita271ebc0ecb681aeea89e8610e457aca15a70284 (patch)
tree562242315e8bd592266a399c67fc3014e8670318 /lib/isnan.c
parentd239853d024ca8fdc9fd719c75025020611ff5a1 (diff)
downloadgnulib-a271ebc0ecb681aeea89e8610e457aca15a70284.tar.gz
isnan: Add support for TinyCC
Without this patch, tcc bails out: isnan.c:132: division by zero in constant Tested with tcc 0.9.25 on x86_64-linux-gnu. * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like `__SUNPRO_C' & co.
Diffstat (limited to 'lib/isnan.c')
-rw-r--r--lib/isnan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/isnan.c b/lib/isnan.c
index ee9fa8b644..ddad7fbfe4 100644
--- a/lib/isnan.c
+++ b/lib/isnan.c
@@ -117,7 +117,8 @@ FUNC (DOUBLE x)
# else
/* Be careful to not do any floating-point operation on x, such as x == x,
because x may be a signaling NaN. */
-# if defined __SUNPRO_C || defined __DECC || (defined __sgi && !defined __GNUC__)
+# 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
recognize the initializers as constant expressions. The latter compiler
also fails when constant-folding 0.0 / 0.0 even when constant-folding is