From owner-freebsd-questions@FreeBSD.ORG Mon Jan 23 20:15:08 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE4791065672 for ; Mon, 23 Jan 2012 20:15:08 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by mx1.freebsd.org (Postfix) with ESMTP id 33A538FC0C for ; Mon, 23 Jan 2012 20:15:06 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id q0NKEZ15048164 for ; Mon, 23 Jan 2012 21:14:35 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 6EB0812362; Mon, 23 Jan 2012 21:14:35 +0100 (CET) Date: Mon, 23 Jan 2012 21:14:35 +0100 From: Roland Smith To: freebsd-questions@freebsd.org Message-ID: <20120123201435.GB32692@slackbox.erewhon.net> References: <20120121133506.7bcfaec9@gumby.homeunix.com> <20120121154313.53d3fec6@gumby.homeunix.com> <20120122070205.GA13081@hemlock.hydra> <4F1BB640.2050707@herveybayaustralia.com.au> <20120122074558.GA22918@hemlock.hydra> <4F1BD17C.3030209@herveybayaustralia.com.au> <20120122123748.GA26579@hemlock.hydra> <20120122203302.GA90962@slackbox.erewhon.net> <20120122212653.GA2489@hemlock.hydra> <4F1C9370.8080609@herveybayaustralia.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline In-Reply-To: <4F1C9370.8080609@herveybayaustralia.com.au> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Clang - what is the story? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 20:15:08 -0000 --+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 23, 2012 at 08:53:36AM +1000, Da Rock wrote: > On 01/23/12 07:26, Chad Perrin wrote: > > On Sun, Jan 22, 2012 at 09:33:02PM +0100, Roland Smith wrote: > >> PCC is only a C compiler, and there is some C++ code (e.g. groff) in t= he base > >> system. The FreeBSD port is marked as i386 and amd64 only, even though= other > >> architectures seem to be there in the PCC source. > > I had somehow forgotten there was anything in the base system written in > > C++. That would probably account for the choice of Clang over PCC. > What part is that? I thought it had to be all c... To the best of my knowledge the restriction to C only applies to the kernel and libraries, not to the utilities in the base system. And it is for a technical reason. C++ "mangles" function names to e.g. include argument typ= es and class names. See=20 [http://en.wikipedia.org/wiki/Name_mangling#Name_mangling_in_C.2B.2B]. This practically means that you can use a C library from a C++ program, but= not the other way around. Then again, the kernel has more restrictions. Like no floating point allowed and no libc available. And presumably many more w.r.t. locking of data structures and practical limits on interrupt handlers. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --+g7M9IMkV8truYOl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk8dv6sACgkQEnfvsMMhpyV/sQCgjsTuqhU1LOIzOzml22al7m5F ynEAnj8E8RqbEvqy25h8BV2VRW+lUoTR =1lTu -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl--