summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-12-01 21:14:17 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-12-01 21:14:17 +0100
commit59d1bc73a0da33eae196f918b649b9489e39681d (patch)
treefcab1b134ad7b3f90a415c8d34074414f0e3dfbc
parent076b809677ea8a2860212dcf3bd99e2070ac4f83 (diff)
parent61086b8e599a3317728b8d5aa04b5d30fa50133f (diff)
downloadNim-59d1bc73a0da33eae196f918b649b9489e39681d.tar.gz
Merge pull request #3605 from ephja/echo-flush
flush after printing
-rw-r--r--compiler/ccgexprs.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 1a1c1eb6f..51f88d305 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -959,6 +959,7 @@ proc genEcho(p: BProc, n: PNode) =
       addf(args, ", $1? ($1)->data:\"nil\"", [rdLoc(a)])
   linefmt(p, cpsStmts, "printf($1$2);$n",
           makeCString(repeat("%s", n.len) & tnl), args)
+  linefmt(p, cpsStmts, "fflush(stdout);$n")
 
 proc gcUsage(n: PNode) =
   if gSelectedGC == gcNone: message(n.info, warnGcMem, n.renderTree)