From b4808867a2ede79b7c22823aaa75e388456b7b39 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 21 Apr 2021 23:44:00 -0700 Subject: qbe: Print floating point with DBL_DECIMAL_DIG precision DECIMAL_DIG may vary from system to system depending on the width of long double, causing one of the tests to fail. --- qbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qbe.c b/qbe.c index 1c4af9e..91b88fd 100644 --- a/qbe.c +++ b/qbe.c @@ -1039,7 +1039,7 @@ emitvalue(struct value *v) switch (v->kind) { case VALUE_CONST: if (v->repr->base == 's' || v->repr->base == 'd') - printf("%c_%.*g", v->repr->base, DECIMAL_DIG, v->f); + printf("%c_%.*g", v->repr->base, DBL_DECIMAL_DIG, v->f); else printf("%" PRIu64, v->i); break; -- cgit v1.2.3