delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/17/01:56:20

Date: Sun, 17 Dec 2000 08:11:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: problem
In-Reply-To: <4vln3tsoqvuc1qrhqtf0u9ap5760pqv8a7@4ax.com>
Message-ID: <Pine.SUN.3.91.1001217080613.3325C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 16 Dec 2000, Jason Green wrote:

> Indeed there does seem to be a bug in gcc:
[snip]
> $ gcc -.c
> gcc.exe: unrecognized option `-.c'
> gcc.exe: No input files
> $ gcc --.c
> gcc.exe: No input files
> $ gcc ---.c
> gcc.exe: No input files
> $ gcc --
> gcc.exe: Ambiguous abbreviation --

This is not a bug: if you have files which begin with dashes, you need 
either say "gcc ./--.c", or use the "--" pseudo-switch before the file 
name, like this:

	gcc -- --.c

This is not special to gcc, it's common to all GNU packages which use the 
GNU getopt function.  The reason is (of course) that "--" starts a long 
option and "-" starts a short option.

I believe this is somewhere in the manual (if not, please submit a 
documentation bug report to GCC maintainers).

But even if you don't invoke GCC correctly with such file names, it 
should not (and does not) crash.  It should simply print error messages 
such as those cited above, and exit.

- Raw text -


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