Merge pull request #3605 from ephja/echo-flush

flush after printing
This commit is contained in:
Andreas Rumpf
2015-12-01 21:14:17 +01:00

View File

@@ -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)