[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Options issues

From: Luis Alejandro Muzzachiodi
Subject: [Tinycc-devel] Options issues
Date: Mon, 18 Apr 2011 18:51:42 -0700 (PDT)

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). However
-> tcc -o hello -c hello.c
<- file hello (object)
doesn't adds .o (even with the option -o present)
->tcc -o hello hello.c
<-file «hello» executable
Why doesn't adds (or fixs if outfile has other extension)  ".exe"? (Windows)

2) Ambiguity
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).

3) Overwriting
->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,
->tcc -
<-stdin:1: error: unrecognized character \x16
-> tcc - 
<-tcc: error: undefined symbol 'main'.
tcc begin to read stdin.
Adding some option
->tcc - hello.c
-> ^Z
<- file a.exe (executable)
->tcc - -c
-> ^Z
<- file a.out (object)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]