🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15923

Re: Behavior of inline

#15923
From: Sebastian
Date: Sun, 08 Jun 2003 16:40
31 lines
2115 bytes
To my mind there is not a force inline function because if so i would
violate the meaning.
Inlines are only useful where no dynamic code is needed.

For instance while, for, do while, switch generate code which depends on
their expression.

while( int i=1 < x=100) differs from while( int i=1 < x=1000)

Another qualifier which breaks the inline qualifier is return because return
returns a value to the caller.
In Assembler it would be not the same if the function is called twice.

In addition there is not a cost/benefit decision it depends on the
expressions within the functions.




"Chris" <Chris8852@adelphia.net> schrieb im Newsbeitrag
news:3ee19817$1@newsgroups.borland.com...
> Microsoft VC++ has 'inline' and '__forceinline'.. 'inline' doesn't always
> create an inline function, it does a cost/benefit analysis first. Both
> inline in BCB and __forceinline in MSVC++ have cases where they can't
expand
> inline. I'm wondering if in BCB, inline uses a cost/benefit analysis, or
> just (tries) to force it? If it uses cost/benefit analysis, then how can I
> (try to) force it?
>
>
Technical Details
Message-ID: <3ee36749@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ee19817$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,3cf3a4bed32fbb6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-08 09:51:10 PST
From: "Sebastian" <sebastiankrug@yahoo.de>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ee19817$1@newsgroups.borland.com>
Subject: Re: Behavior of inline
Date: Sun, 8 Jun 2003 18:40:38 +0200
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 217.231.190.96
Message-ID: <3ee36749@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055090505 217.231.190.96 (8 Jun 2003 09:41:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail