Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   forcing compiler to consider inline function inline. (http://www.velocityreviews.com/forums/t452942-forcing-compiler-to-consider-inline-function-inline.html)

Ajay 03-30-2006 06:21 PM

forcing compiler to consider inline function inline.
 
Hi all,
I want to force that compiler take the function INLINE if i declare it
inline.I know there is some macro to force the compiler to take the
function as inline..but unfortunately i dont know the name.Please tell
if there is any other way to do so if you know.
Thanks in advance. Ajay


Tomás 03-30-2006 06:22 PM

Re: forcing compiler to consider inline function inline.
 
Ajay posted:

> Hi all,
> I want to force that compiler take the function INLINE if i declare it
> inline.I know there is some macro to force the compiler to take the
> function as inline..but unfortunately i dont know the name.Please tell
> if there is any other way to do so if you know.
> Thanks in advance. Ajay
>
>


Something like:

__forceinline


-Tomás

Ajay 03-30-2006 06:25 PM

Re: forcing compiler to consider inline function inline.
 

Tomás wrote:
> Ajay posted:
>
> > Hi all,
> > I want to force that compiler take the function INLINE if i declare it
> > inline.I know there is some macro to force the compiler to take the
> > function as inline..but unfortunately i dont know the name.Please tell
> > if there is any other way to do so if you know.
> > Thanks in advance. Ajay
> >
> >

>
> Something like:
>
> __forceinline
>
>
> -Tomás



Have you used it yourself.?Are you sure.??Please reply fast.thank you.


Tomás 03-30-2006 06:30 PM

Re: forcing compiler to consider inline function inline.
 
Ajay posted:

>
> Tomás wrote:
>> Ajay posted:
>>
>> > Hi all,
>> > I want to force that compiler take the function INLINE if i declare

it
>> > inline.I know there is some macro to force the compiler to take the
>> > function as inline..but unfortunately i dont know the name.Please

tell
>> > if there is any other way to do so if you know.
>> > Thanks in advance. Ajay
>> >
>> >

>>
>> Something like:
>>
>> __forceinline
>>
>>
>> -Tomás

>
>
> Have you used it yourself.?Are you sure.??Please reply fast.thank you.
>
>


Never used it myself, but I vaguely remember seeing something like it in
a compiler's helpbook.

Note that it's a compiler extension, it's nothing to do with the C++
programming language.


-Tomás

Gavin Deane 03-30-2006 07:26 PM

Re: forcing compiler to consider inline function inline.
 

Tomás wrote:

> Ajay posted:
>
> >
> > Tomás wrote:
> >> Ajay posted:
> >>
> >> > Hi all,
> >> > I want to force that compiler take the function INLINE if i declare

> it
> >> > inline.I know there is some macro to force the compiler to take the
> >> > function as inline..but unfortunately i dont know the name.Please

> tell
> >> > if there is any other way to do so if you know.
> >> > Thanks in advance. Ajay
> >> >
> >> >
> >>
> >> Something like:
> >>
> >> __forceinline
> >>
> >>
> >> -Tomás

> >
> >
> > Have you used it yourself.?Are you sure.??Please reply fast.thank you.
> >
> >

>
> Never used it myself, but I vaguely remember seeing something like it in
> a compiler's helpbook.
>
> Note that it's a compiler extension, it's nothing to do with the C++
> programming language.


Indeed there is _no_ way to do it in standard C++ so, to the OP: you
will need to look in your compiler documentation or ask a group
dedicated to your compiler because the answer, if there is one, is
likely to be different depending on what compiler you are using.

Gavin Deane


Pete Becker 04-01-2006 02:03 PM

Re: forcing compiler to consider inline function inline.
 
Ajay wrote:

> Hi all,
> I want to force that compiler take the function INLINE if i declare it
> inline.I know there is some macro to force the compiler to take the
> function as inline..but unfortunately i dont know the name.Please tell
> if there is any other way to do so if you know.
> Thanks in advance. Ajay
>


The C++ language definition says that inline is a hint to the compiler
(as to inlining itself; it also has some semantic consequences).
Anything else is compiler-specific, and is best discussed in a
compiler-specific newsgroup.

--

Pete Becker
Roundhouse Consulting, Ltd.


All times are GMT. The time now is 01:17 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57