[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sid: gcc (GCC) 3.2.2 20030109 (Debian prerelease) strange!



* Colin Watson <cjwatson@debian.org> [2003-01-18 20:23]:
> On Sat, Jan 18, 2003 at 07:40:17PM +0100, Lukas Ruf wrote:
> > 
> > yeah.  Thanks for the hint, it worked.  However, I think this is a
> > quite stupid behaviour of gcc 3.x -- it should automagically call the
> > correct compiler/linker depending on the extension provided.
> 
> If you invoke 'gcc' to compile a .cpp file (and so on), it will indeed
> treat it as a file containing C++ source. However, in that case you must
> supply the correct linker arguments yourself.
> 
what is the sense there?

> Far from being stupid, this is in fact sometimes desired behaviour for
> people who want finer control over the linking process. At work we use
> our own C++ libraries rather than the standard library. As a result, we
> actively prefer not to link against -lstdc++; instead, we link against
> -lsupc++, which provides the basic runtime facilities like 'new' and
> 'delete'. Since it's possible to write your own new and delete
> operators, some people might not even need this (?).
> 
Of course, a deviation of what is carried out per default should
always be achievable.  However, these guys that require this feature
are usually more knowledged than the common people.  For this reason
it should help those without such a knowledge but not hinder the more
powerful guys.

Refering to your example, you could achieve the same with ld, couldn't
you?  

> > Long time ago, I learned *.cc was c++, *.c was c -- obviously this
> > does not hold anymore.
> 
> It does, just not in the way you expect.
> 
Maybe it should!  Assume a guy just using Linux wo. knowing much --
why is Windoofs so widely used? (*)

wbr,
Lukas
PS: (*) All my machines run under Linux only ,-)
-- 
Lukas Ruf
http://www.lpr.ch
Wanna know anything about raw ip? 
Join rawip@rawip.org on http://www.rawip.org



Reply to: