Mail Archives: djgpp/2000/12/17/01:56:20
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 -