From: jason@cygnus.com (Jason Merrill)
Subject: Re: gcc 2.7.2, ld warnings on Digital UNIX v3.2
Date: 1996/05/08 [thread overview]
Message-ID: <u9pw8faz81.fsf@yorick.cygnus.com> (raw)
In-Reply-To: 4kubph$b90@vertex.tor.hookup.net
>>>>> Phil Edwards <pedwards@valhalla.cs.wright.edu> writes:
> 1) I never asked GNU to automatically link the math library. Just
> because I'm using C++ instead of C doesn't imply that I require the
> hefty math functions present only in libm. I used to just invoke gcc
> -- since the docs specify that it shouldn't matter, that gcc will see a
> .C or .cc file and start looking for C++. Until...
The problem is that libstdc++ shared libraries depend on libm.
> 2) I no longer have my little test bed program which would demonstrate
> this, but I finally got fed up one day with gcc giving me braindead
> errors on two pieces of reasonable C++ code. So I bit my tongue and
> tried calling it as g++ instead. The first piece of code turned out to
> be just fine -- it was simply a part of C that had been changed in the
> C++ specifications, and the compiler was still treating it like illegal
> C.
You sure that file didn't have a .c extension? I've never heard of any
problems with recognising extensions before.
> I kept that .cc file for a long time, just to be able to demonstrate
> that the testing of file extensions is broken in gcc 2.6.x and later,
> and that to insure "C++ mode" one must call it as g++ -- which means
> putting up with all of the moronic conflicts in the math library. One
> /used/ to be able to simply use "gcc -x c++ -x none" along with any
> other needed options -- much like the script would do -- and achieve a
> perfect compilation. It still does this in 2.7.2, and now the docs
> begin to imply that to get a perfect, really-C++-I-mean-it compilation,
> one must use g++ because the binary image and only the binary image can
> get the options correct.
Nope, nope, nope. I usually use 'gcc'.
Jason
next prev parent reply other threads:[~1996-05-08 4:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-15 4:00 gcc 2.7.2, ld warnings on Digital UNIX v3.2 Carm Frascatore
1996-04-15 4:00 ` Murray S. Kucherawy
1996-04-17 4:00 ` Allen M. Cohen
1996-04-17 4:00 ` Norbert Berzen
1996-04-25 4:00 ` Radenko Kalajdzic
1996-05-01 4:00 ` Phil Edwards
1996-04-18 4:00 ` Tim Lucia
1996-05-01 4:00 ` Daniel S. Riley
1996-05-01 4:00 ` Dale Hagglund
1996-05-08 4:00 ` Phil Edwards
1996-05-08 4:00 ` Jason Merrill [this message]
1996-05-09 4:00 ` Gary Holt
1996-04-18 4:00 ` John C. Fowler
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox