This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: running just g++.
- To: Jimen Ching <jching at flex dot com>
- Subject: Re: running just g++.
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 28 Feb 1998 20:42:33 -0700
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.BSI.3.95.980228165923.6138B-100000@flex.com>you write:
> ~/src/bug% /usr/local/bin/gcc
> gcc: No input files
> [core:ttyp1]
> ~/src/bug% /usr/local/bin/g++
> /usr/lib/crt1.o: In function `_start':
> /usr/lib/crt1.o(.text+0x57): undefined reference to `main'
> collect2: ld returned 1 exit status
>
> This is not a bug or anything. But why does g++ invoke the linker
> (collect2) when there's no input files? gcc does the right thing. I
> tought they both use the same driver? This is a problem for configure
> scripts that try to detect the compiler by running it without input files.
> g++ returns an error code (1).
It's a bug in the g++ and g77 front ends.
jeff