Re: Is there stack associated when a executing an inline function?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Fri, 29 Feb 2008 08:41:25 -0800
jacob navia <jacob@xxxxxxxxxx> writes:
Mahesh wrote:
I need to know if stack frames are generated in case of a
inline function execution or
do they execute just like macros?
A stack <frame> will not be generated but any local
storage that the inline function uses will be added to
the local storage of the calling function.
How do you know? Can you cite the standard to support this claim?
The implementation you describe is certainly plausible, but the
standard says nothing about stack frames, either for inline functions
or for ordinary functions. See C99 6.7.4. To the original poster: a
recent draft of the C99 standard can be downloaded in PDF format from
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf>.
Briefly, the standard imposes some restrictions on inline functions,
but otherwise says only that they behave like ordinary functions.
[snip]
--
Keith Thompson (The_Other_Keith) <kst-u@xxxxxxx>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- Follow-Ups:
- Re: Is there stack associated when a executing an inline function?
- From: jacob navia
- Re: Is there stack associated when a executing an inline function?
- References:
- Is there stack associated when a executing an inline function?
- From: Mahesh
- Re: Is there stack associated when a executing an inline function?
- From: jacob navia
- Is there stack associated when a executing an inline function?
- Prev by Date: array index and pointer, which is faster?
- Next by Date: Re: dual core and c
- Previous by thread: Re: Is there stack associated when a executing an inline function?
- Next by thread: Re: Is there stack associated when a executing an inline function?
- Index(es):
Relevant Pages
|