diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-05-06 23:00:41 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-05-06 23:00:41 -0600 |
commit | adb8a2cd0d7bf835f987fa6a6202545cb7336956 (patch) | |
tree | 655fcf13cd7501547db56534682a6cac016d585c | |
parent | 4031fef0bba9575d1c9d45af06b3a9996311880c (diff) | |
download | dimension-adb8a2cd0d7bf835f987fa6a6202545cb7336956.tar.xz |
Make tests pass with -fno-signed-zeros.
-rw-r--r-- | dimension/parse.c | 6 |
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: |