From 0831f0d954925950f1672b8c72af3f97378b72df Mon Sep 17 00:00:00 2001 From: "igor.bukanov%gmail.com" Date: Mon, 13 Nov 2006 10:50:40 +0000 Subject: [PATCH] 360282: Debug-only warning about broken FPU state. r=brendan --- js/src/jsdtoa.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/src/jsdtoa.c b/js/src/jsdtoa.c index 529a5739d54..0cb04c01268 100644 --- a/js/src/jsdtoa.c +++ b/js/src/jsdtoa.c @@ -2425,6 +2425,15 @@ js_dtoa(double d, int mode, JSBool biasUp, int ndigits, } d *= 10.; } +#ifdef DEBUG + if (d != 0.0) { + fprintf(stderr, +"WARNING: A loss of precision for double floating point is detected.\n" +" The result of any operation on doubles can be meaningless.\n" +" A possible cause is missing code to restore FPU state, see\n" +" bug 360282 for details.\n"); + } +#endif goto ret1; }