forcing compiler to consider inline function inline.

Discussion in 'C++' started by Ajay, Mar 30, 2006.

  1. Ajay

    Ajay Guest

    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
     
    Ajay, Mar 30, 2006
    #1
    1. Advertising

  2. Ajay

    Tomás Guest

    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
     
    Tomás, Mar 30, 2006
    #2
    1. Advertising

  3. Ajay

    Ajay Guest

    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.
     
    Ajay, Mar 30, 2006
    #3
  4. Ajay

    Tomás Guest

    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
     
    Tomás, Mar 30, 2006
    #4
  5. Ajay

    Gavin Deane Guest

    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
     
    Gavin Deane, Mar 30, 2006
    #5
  6. Ajay

    Pete Becker Guest

    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.
     
    Pete Becker, Apr 1, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Briggs

    Are these consider doorways

    Paul Briggs, Feb 20, 2004, in forum: HTML
    Replies:
    3
    Views:
    370
    Spartanicus
    Feb 21, 2004
  2. Replies:
    0
    Views:
    278
  3. TGOS
    Replies:
    3
    Views:
    401
    Kevin Bracey
    Feb 28, 2005
  4. Lynn McGuire

    forcing code inline

    Lynn McGuire, Jun 27, 2006, in forum: C++
    Replies:
    10
    Views:
    613
    Richard Herring
    Jun 30, 2006
  5. john
    Replies:
    14
    Views:
    399
    Joshua Maurice
    Dec 20, 2011
Loading...

Share This Page