This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
definition of "implicit" inline?
- From: Martin Reinecke <martin at MPA-Garching dot MPG dot DE>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 31 Jul 2003 10:14:37 +0200
- Subject: definition of "implicit" inline?
- Organization: Max-Planck-Institut fuer Astrophysik
Hi,
there seems to be a lot of confusion concerning the term
"implicit inline". Maybe it would remove some misunderstandings
if everyone would state clearly what he means by this term.
In C++, the expression
long a;
is equivalent to
long int a;
This behavior is called "implicit int".
If I'm not greatly mistaken, the code
class foo {
void bar() { ...}
};
is also equivalent to (i.e. should be treated by the compiler
in the same way as)
class foo {
inline void bar() { ...}
};
(see, e.g. Struostrup, 3rd ed, chapter 10.2.9)
What's wrong about calling this behavior "implicit inline"? I'd
argue it practically begs for that name.
What's your take on this?
Thanks,
Martin