diff options
Diffstat (limited to 'src/printer/cfamily.cpp')
-rw-r--r-- | src/printer/cfamily.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/printer/cfamily.cpp b/src/printer/cfamily.cpp index e1e2b9a..299c81c 100644 --- a/src/printer/cfamily.cpp +++ b/src/printer/cfamily.cpp @@ -160,10 +160,13 @@ void CFamily::printS(std::string ident, chillAST_DeclRefExpr *n, std::ostream &o } void CFamily::printS(std::string ident, chillAST_FloatingLiteral *n, std::ostream &o) { - // Althedigits contaminates the result - o << showpoint << n->value; - if (n->getPrecision() == 1) - o << "f"; + if (n->allthedigits) + o<<n->allthedigits; + else { + o << showpoint << n->value; + if (n->getPrecision() == 1) + o << "f"; + } } void CFamily::printS(std::string ident, chillAST_ForStmt *n, std::ostream &o) { |