public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Martin Reinecke <martin@MPA-Garching.MPG.DE>
Cc: gcc@gcc.gnu.org
Subject: Re: definition of "implicit" inline?
Date: Thu, 31 Jul 2003 10:08:00 -0000	[thread overview]
Message-ID: <m3vftjks89.fsf@uniton.integrable-solutions.net> (raw)
In-Reply-To: <3F28CFED.3020002@mpa-garching.mpg.de>

Martin Reinecke <martin@MPA-Garching.MPG.DE> writes:

| 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.

Because 

  1) it is the original syntax for "inline" -- as I already explained.

  2) It confused people into thinking that the inline is not requested 
     -- we already have evidence for such confusion, and this by some
       midlle end people, and that IS very alarming.
     I think we're better off just avoid that term for that situation
     because it means different thing for different people.  And we
     already have a name for that -- just "inline" -- why invent a new
     one that end to confuse people?  See "The Design and Evolution of C++",
    section "Run-Time Efficiency".

  3) implicit inline seems to mean different thing for middle end
     people who think that it means "I don't care".


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.

-- Gaby

  reply	other threads:[~2003-07-31  8:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 10:02 Martin Reinecke
2003-07-31 10:08 ` Gabriel Dos Reis [this message]
2003-07-31 10:50 ` Andreas Schwab
2003-07-31 11:02 Robert Dewar
2003-07-31 11:04 ` Gabriel Dos Reis
2003-07-31 11:59 Robert Dewar
2003-07-31 12:41 ` Gabriel Dos Reis
2003-07-31 13:12 Robert Dewar
2003-07-31 13:37 ` Gabriel Dos Reis
2003-08-02 17:21 ` Marc Espie
2003-07-31 13:53 Robert Dewar
2003-07-31 13:58 ` Gabriel Dos Reis
2003-07-31 14:00   ` Gabriel Dos Reis

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=m3vftjks89.fsf@uniton.integrable-solutions.net \
    --to=gdr@integrable-solutions.net \
    --cc=gcc@gcc.gnu.org \
    --cc=martin@MPA-Garching.MPG.DE \
    /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).