# HG changeset patch # User Ludovic Courtès # Date 1287150237 -7200 # Node ID 829f93de17edf820215107f46be9179a96e057d7 # Parent 3468ff86245b5e0f973f5c7a7b8ab9d34836bc13 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. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/lib/isnan.c +++ b/lib/isnan.c @@ -117,7 +117,8 @@ # 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