|After many mistyping working with tcc i'm found some issues with the CL's options: |
[references: -> is in , <- is out]
1) Default extensions
-> tcc -c hello.c
<- file «hello.o» (object)
According documentation option -o must be given. But the name and the extension is figured out for default(nice).
-> tcc -o hello -c hello.c
<- file hello (object)
doesn't adds .o (even with the option -o present)
->tcc -o hello hello.c
Why doesn't adds (or fixs if outfile has other extension) ".exe"? (Windows)
tcc -o -c hello.c
-> file -c (executable)
-c is an option or outfile's name.?.
By default would be an option (though may be optionally the outfile's name with «tcc -o -c -c hello.c», for example).
->tcc -o hello.c -c hello.c
<- file hello.c (object)
the original hello.c is missing!.
Overwrite the outfile's extension (or add if not) with the default extension .o would be a safe alternative.
4) Stdin with run
According to documentation «-» replaces stdin for infile with the option "run". However,
<-stdin:1: error: unrecognized character \x16
-> tcc -
<-tcc: error: undefined
tcc begin to read stdin.
Adding some option
->tcc - hello.c
<- file a.exe (executable)
->tcc - -c
<- file a.out (object)