www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/20/06:43:56

Date: Thu, 20 Jun 1996 13:32:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bruce Foley <brucef AT central DOT co DOT nz>
Cc: djgpp AT delorie DOT com
Subject: Re: Question from a new user
In-Reply-To: <4qb17n$2gf@status.gen.nz>
Message-Id: <Pine.SUN.3.91.960620132557.21348D-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019