From a271ebc0ecb681aeea89e8610e457aca15a70284 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 15 Oct 2010 15:43:57 +0200 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ lib/isnan.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4e36a0ff9..fcdc6287f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-15 Ludovic Courtès + + * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like `__SUNPRO_C' + & co. + 2010-10-14 Bruno Haible vasnprintf: Don't set errno to 0. diff --git a/lib/isnan.c b/lib/isnan.c index ee9fa8b64..ddad7fbfe 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 -- 2.11.0