X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FKaleidoscope%2FChapter4%2Ftoy.cpp;h=c102784b531d292698d199c6664aad6043e469d4;hb=b325a1ace53c1f0b1b38505fefeb08114f40dc10;hp=12777ae2c758fa93587b969b6c546aaedd9c9423;hpb=2b96ce62f49d4701bc9880e27ebc894a371342e2;p=oota-llvm.git diff --git a/examples/Kaleidoscope/Chapter4/toy.cpp b/examples/Kaleidoscope/Chapter4/toy.cpp index 12777ae2c75..c102784b531 100644 --- a/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/examples/Kaleidoscope/Chapter4/toy.cpp @@ -632,13 +632,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - putchar((char)X); + fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - printf("%f\n", X); + fprintf(stderr, "%f\n", X); return 0; }