aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-01-06 22:19:45 +0300
committerseyko <seyko2@gmail.com>2015-01-06 22:19:45 +0300
commitc334b591429509730e9925b53ea23645d49cd8ce (patch)
tree0ed35b75d6da33dfa3de1b424c0dfc9731eb6398 /tcc.c
parentb93179f3c077977ff64053ee61c3bebbd1d5a940 (diff)
downloadtinycc-c334b591429509730e9925b53ea23645d49cd8ce.tar.gz
tinycc-c334b591429509730e9925b53ea23645d49cd8ce.tar.bz2
Warn about a conflicting compile options spectified on the command line.
Try "tcc -E -c tccasm.c -o tccasm.o"
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcc.c b/tcc.c
index 392efca..c80bb4f 100644
--- a/tcc.c
+++ b/tcc.c
@@ -249,7 +249,6 @@ int main(int argc, char **argv)
const char *first_file = NULL;
s = tcc_new();
- s->output_type = TCC_OUTPUT_EXE;
optind = tcc_parse_args(s, argc - 1, argv + 1);
tcc_set_environment(s);
@@ -259,6 +258,9 @@ int main(int argc, char **argv)
return 1;
}
+ if (s->output_type == 0)
+ s->output_type = TCC_OUTPUT_EXE;
+
if (s->option_m)
exec_other_tcc(s, argv, s->option_m);