aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libtcc.c b/libtcc.c
index 248dc7c..6d65e84 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: