From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8698 invoked by alias); 12 Jun 2006 17:08:23 -0000 Received: (qmail 8548 invoked by uid 22791); 12 Jun 2006 17:08:18 -0000 X-Spam-Check-By: sourceware.org Received: from divok.RZ-Berlin.MPG.DE (HELO divok.rz-berlin.mpg.de) (141.14.131.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Jun 2006 17:07:43 +0000 Received: from divok.rz-berlin.mpg.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id E6BAE29F9D for ; Mon, 12 Jun 2006 19:07:39 +0200 (CEST) Received: from gowron.rz-berlin.mpg.de.fhi-berlin.mpg.de (gowron.RZ-Berlin.MPG.DE [141.14.130.77]) by divok.rz-berlin.mpg.de (Postfix) with ESMTP id CB0A229ED6 for ; Mon, 12 Jun 2006 19:07:39 +0200 (CEST) From: =?iso-8859-1?Q?Jochen_K=FCpper?= To: gsl-discuss@sources.redhat.com Subject: Re: Let C++ always use inline functions (patch) In-Reply-To: <17549.33104.914229.584484@hp2.network-theory.co.uk> (Brian Gough's message of "Mon, 12 Jun 2006 15:59:28 +0100") References: <9ever89ffd.fsf@doze.jochen-kuepper.de> <17549.33104.914229.584484@hp2.network-theory.co.uk> X-Archive: encrypt X-Attribution: Jochen OpenPGP: id=CC1B0B4D; url=http://jochen-kuepper.de/computer/keys.asc X-Request-PGP: http://jochen-kuepper.de/computer/keys.asc X-URL: http://jochen-kuepper.de Date: Tue, 13 Jun 2006 15:56:00 -0000 Message-ID: <9eejxul2u9.fsf@gowron.rz-berlin.mpg.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00098.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1660 "Brian Gough" writes: > Jochen K=FCpper writes: > > It replaces the old test for "HAVE_INLINE" by a test for that macro > > /or/ C++: > > ,---- > > | -#ifdef HAVE_INLINE > > | +#if (defined HAVE_INLINE) || (defined __cplusplus) > > `---- > >=20 > > This is ok, as a C++ compiler is required by the standard to handle > > "inline". > > Good point, I hadn't really thought about that. A few questions: > > - what does the C++ standard say about "extern inline" compared with > "inline" In C++ global inline functions must always be defined in the same compilation unit as their declaration. By default "inline" means "extern inline" -- if not explicitly declared static. This is the case in GSL already (and probably required by C as well). > - is it affected by the extern "C" { .. } around these definitions Wohoo -- dunno for sure. Stroustrup "The C++ Programming language", special edition 2004, p.206: ,---- | An /extern "C"/ directive specifies the linkage convention (only) | and does not affect the semantics of calls to the function. ... `---- In my understanding this means that only the linkage-name is altered, nothing else.=20 > - have you tried this on any other compilers Other than? ;) No, I only have GCC. Maybe someone could try this on one of these compile-farms around? Is that possible? Anybody here still using a DEC-, IBM-, PG-, or Sun-compiler or such? Greetings, Jochen --=20 Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert=E9, =C9galit=E9, Fraternit=E9 GnuPG key: CC1B0B4D (Part 3 you find in my messages before fall 2003.) --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFEjZ9h7eYXdswbC00RAlVGAJ0Sz/yMUUO5frOka6NgI7BHDLQAYQCfZuF+ JwWCCLyaMh1tyE3jORTUfXM= =HdVs -----END PGP SIGNATURE----- --=-=-=--