From 67376adac7ca7957f9dd0cc33956d647e1e61000 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sun, 14 Sep 2008 15:30:43 +0000 Subject: [PATCH] - Ugly fix: MSVC runtime does not support long double printing, cast to double yet [r21942] --- ast.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ast.c b/ast.c index 8452b12..060aa6c 100644 --- a/ast.c +++ b/ast.c @@ -208,7 +208,12 @@ static void print_const(const const_expression_t *cnst) fprintf(out, "%lld", cnst->v.int_value); } else if (is_type_float(type)) { long double const val = cnst->v.float_value; +#ifdef _WIN32 + /* ARG, no way to print long double */ + fprintf(out, "%.20g", (double)val); +#else fprintf(out, "%.20Lg", val); +#endif if (isfinite(val) && truncl(val) == val) fputs(".0", out); } else { -- 2.20.1