This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: definition of "implicit" inline?
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: martin at MPA-Garching dot MPG dot DE, gcc at gcc dot gnu dot org
- Date: 31 Jul 2003 12:30:59 +0200
- Subject: Re: definition of "implicit" inline?
- Organization: Integrable Solutions
- References: <20030731101937.B257DF2E19@nile.gnat.com>
dewar@gnat.com (Robert Dewar) writes:
| > Let's keep it simple and straight. The example you gave is just that
| > of an inline function, not implicit inline function. There is nothing
| > implicit about it. It is an alternate syntax for defining an inline
| > function. Not a syntax for defining an implicit inline function.
|
| I find this exegesis confusing and self serving.
No it is not exegis not confusing neither self servin, unless you don't
know C++.
| It seems quite fine to
| refer to the form without inline has being implicitly inlined. Whether the
| two forms should or should not be treated differently is another matter.
In C++, they are no different.
| One might ask *why* are there two forms. Perhaps someone should quote the
| exact language from the standard here.
I already give the reasons at multiple occasions in this debate with
the appropriate quotes.
The reason is mostly historic (see "The Design and Evolution of C++",
section "Run-Time Efficiency").
When inlining was orginally introduced in C with Classes, the only
syntax available was definition within the class declaration and
inlining was considered only for member functions. Later, the keyword
"inline" was introduced to permit inlining request for functions not
defined within a class. There is no slight difference nor implication
that one form is superior to the other in terms of request.
-- Gaby