From owner-freebsd-questions@FreeBSD.ORG Fri Apr 16 13:50:48 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D27FF16A4CE for ; Fri, 16 Apr 2004 13:50:48 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E01D43D1F for ; Fri, 16 Apr 2004 13:50:48 -0700 (PDT) (envelope-from freebsd-questions@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BEaIR-0004LU-00 for ; Fri, 16 Apr 2004 22:50:47 +0200 Received: from 213-203-244-156.kunde.vdserver.de ([213.203.244.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Apr 2004 22:50:47 +0200 Received: from kai by 213-203-244-156.kunde.vdserver.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Apr 2004 22:50:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Kai Grossjohann Date: Fri, 16 Apr 2004 22:31:25 +0200 Lines: 20 Message-ID: <87pta73bs2.fsf@emptyhost.emptydomain.de> References: <200404151110.i3FBAaoo048373@adsl-68-76-19-75.dsl.klmzmi.ameritech.net> <200404161720.37041.dgw@liwest.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:0PC9nFVqDSzsfQT0/aKhaV4HF+Y= Sender: news Subject: Re: Beginning C++ in FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2004 20:50:48 -0000 Daniela writes: > What? C++ code is converted to C? Which compiler are you using, and > why the hell would a compiler do this? In the old days, C++ was implemented by a program called cfront, I believe, and it did convert C++ to C. If you can write a program that converts language X to C, then you get to take advantage of all the nifty optimizing C compilers out there. If you try to go the direct route to compiling into machine language, then you need to do the optimization part yourself. So converting into C as an intermediary language is an option that requires less work. GCC has a backend which can server as an intermediary language, I guess, but if you convert into C, then you aren't even wedded to GCC. Kai