Mail Archives: djgpp/1996/06/20/06:43:56
On Thu, 20 Jun 1996, Bruce Foley wrote:
> The next thing is that I mistakenly typed:
> gcc -o module.c module.s
> The bloody thing deleted my source code!!!!!
>
> I know the above was a silly mistake (brought on by my
> egerness to do a test run) but isn't that a harsh punishment?
> I can't help but feel that the compiler should treat anything
> that might potentially be source code with absolute sanctity.
It's not the job of a compiler (IMHO) to know what are the reasonable
command-lines for various types of compilation, or else it will annoy
users that know what they are doing in such cases. If you want safe
command lines, either let the compiler use its defaults, or use Make
which has been taught this kind of wisdom. E.g., in your case, either of
the following commands should do the job (assuming you want to assemble
module.s into module.o):
gcc -c module.s
make module.o
- Raw text -