summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-05-06 23:00:41 -0600
committerTavian Barnes <tavianator@gmail.com>2010-05-06 23:00:41 -0600
commitadb8a2cd0d7bf835f987fa6a6202545cb7336956 (patch)
tree655fcf13cd7501547db56534682a6cac016d585c /dimension
parent4031fef0bba9575d1c9d45af06b3a9996311880c (diff)
downloaddimension-adb8a2cd0d7bf835f987fa6a6202545cb7336956.tar.xz
Make tests pass with -fno-signed-zeros.
Diffstat (limited to 'dimension')
-rw-r--r--dimension/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index da22cb2..54b5880 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -1754,8 +1754,10 @@ dmnsn_print_astnode(FILE *file, dmnsn_astnode astnode)
case DMNSN_AST_FLOAT:
dvalue = *(double *)astnode.ptr;
/* Don't print -0 */
- if (dvalue == 0.0) dvalue = 0.0;
- fprintf(file, "(%s %g)", dmnsn_astnode_string(astnode.type), dvalue);
+ if (dvalue == 0.0)
+ fprintf(file, "(%s 0)", dmnsn_astnode_string(astnode.type));
+ else
+ fprintf(file, "(%s %g)", dmnsn_astnode_string(astnode.type), dvalue);
break;
case DMNSN_AST_STRING: