From: "Jochen Küpper" <jochen@fhi-berlin.mpg.de>
To: gsl-discuss@sources.redhat.com
Subject: Re: Let C++ always use inline functions (patch)
Date: Tue, 13 Jun 2006 15:56:00 -0000 [thread overview]
Message-ID: <9eejxul2u9.fsf@gowron.rz-berlin.mpg.de> (raw)
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")
[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]
"Brian Gough" <bjg@network-theory.co.uk> writes:
> Jochen Küpper 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)
> > `----
> >
> > 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.
> - 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
--
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next prev parent reply other threads:[~2006-06-12 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-11 18:59 Jochen Küpper
2006-06-12 15:27 ` Brian Gough
2006-06-13 15:56 ` Jochen Küpper [this message]
2006-06-14 20:38 ` Brian Gough
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9eejxul2u9.fsf@gowron.rz-berlin.mpg.de \
--to=jochen@fhi-berlin.mpg.de \
--cc=gsl-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).