From 93a4ddfa63fe4763aeb9c27264e98e8ce968929e Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Mon, 12 Nov 2018 15:09:26 +0100 Subject: [PATCH] Treat the - output as stdout. --- tcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcc.c b/tcc.c index aa4b816..f780389 100644 --- a/tcc.c +++ b/tcc.c @@ -290,7 +290,7 @@ redo: tcc_error("no input files\n"); if (s->output_type == TCC_OUTPUT_PREPROCESS) { - if (s->outfile) { + if (s->outfile && 0!=strcmp("-",s->outfile)) { ppfp = fopen(s->outfile, "w"); if (!ppfp) tcc_error("could not write '%s'", s->outfile);