bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] isnan: Add support for TinyCC


From: Ludovic Courtès
Subject: [PATCH] isnan: Add support for TinyCC
Date: Fri, 15 Oct 2010 15:43:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

The patch below adds support for TinyCC.  Without it, tcc bails out:

  isnan.c:132: division by zero in constant

Tested with tcc 0.9.25 on x86_64-linux-gnu.

Thanks,
Ludo’.

2010-10-15  Ludovic Courtès  <address@hidden>

        * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like
        `__SUNPRO_C' & co.

diff --git a/lib/isnan.c b/lib/isnan.c
index a59dea7..e292640 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]