public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc tries to compile C programs as C++ !
@ 1998-10-30  9:53 Brett W Vasconcellos
  1998-11-02 10:40 ` Per Bothner
  0 siblings, 1 reply; 3+ messages in thread
From: Brett W Vasconcellos @ 1998-10-30  9:53 UTC (permalink / raw)
  To: egcs, egcs-bugs

I'm having a problem with gcc on my Debian 2.0 Linux system.  I have the egcs
compiler ("gcc --version" reports "egcs-2.90.29 980515 (egcs-1.0.3
release)"). When I try to compile any .c file, gcc attempts to compile it as
C++ instead of C and so often fails.  If I use the "-x c" option, gcc
compiles .c files fine. However, this isn't an adequate solution since I need
to compile some large GNU sources.  Has anyone heard of or experienced this
problem?  Anyone know what I might do to remedy it?

Thanks,
Brett


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gcc tries to compile C programs as C++ !
  1998-10-30  9:53 Gcc tries to compile C programs as C++ ! Brett W Vasconcellos
@ 1998-11-02 10:40 ` Per Bothner
  1998-11-06 18:10   ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 1998-11-02 10:40 UTC (permalink / raw)
  To: Brett W Vasconcellos; +Cc: egcs, egcs-bugs

It sounds like the gcc front-end program is actually the g++
front-end program.  Try linking a program, adding -v to the
gcc command line.  If it adds -lstdc++ (or something involing
libstdc++), even though you didn't ask for it, then you
are running g++ instead.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gcc tries to compile C programs as C++ !
  1998-11-02 10:40 ` Per Bothner
@ 1998-11-06 18:10   ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1998-11-06 18:10 UTC (permalink / raw)
  To: Per Bothner, Brett W Vasconcellos; +Cc: egcs, egcs-bugs

On Mon, Nov 02, 1998 at 10:40:45AM -0800, Per Bothner wrote:
> It sounds like the gcc front-end program is actually the g++
> front-end program.

Actually, I wonder if his input files aren't named .C instead of .c.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-11-06 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-30  9:53 Gcc tries to compile C programs as C++ ! Brett W Vasconcellos
1998-11-02 10:40 ` Per Bothner
1998-11-06 18:10   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).