By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

forcing compiler to consider inline function inline.

P: n/a
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

Mar 30 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
Mar 30 '06 #2

P: n/a

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.

Mar 30 '06 #3

P: n/a
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
Mar 30 '06 #4

P: n/a

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

Mar 30 '06 #5

P: n/a
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.
Apr 1 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.