From c497f9c82c5ac218fc9835a74020c247a04a4735 Mon Sep 17 00:00:00 2001 From: seyko Date: Sun, 10 May 2015 10:13:35 +0300 Subject: [PATCH] warn if multile -o option is given --- libtcc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libtcc.c b/libtcc.c index 248dc7c5..6d65e84c 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1936,6 +1936,10 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) s->option_m = tcc_strdup(optarg); break; case TCC_OPTION_o: + if (s->outfile) { + tcc_warning("multiple -o option"); + tcc_free(s->outfile); + } s->outfile = tcc_strdup(optarg); break; case TCC_OPTION_r: