projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d45cfc6
)
- Ugly fix: MSVC runtime does not support long double printing, cast to double yet
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Sun, 14 Sep 2008 15:30:43 +0000
(15:30 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Sun, 14 Sep 2008 15:30:43 +0000
(15:30 +0000)
[r21942]
ast.c
patch
|
blob
|
history
diff --git
a/ast.c
b/ast.c
index
8452b12
..
060aa6c
100644
(file)
--- 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 {