Re: Meaning of iniline in declspec(dllexport)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Thu, 29 Mar 2007 09:57:54 +0200, mosfet <richom.v@xxxxxxx> wrote:

Hi,

I would like to know if there would be any meaning of declaring an
exported function as inline ?
I am writing a dynamic library(DLL) to hold my trace functions and for
performance reason could I declare them inlined ?
If yes what does it mean ?

One doesn't preclude the other. Of course, when an exported function is
inlined, you might as well be linking statically WRT compilation
dependencies, because the DLL's code becomes part of its client's code.

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages

  • Meaning of iniline in declspec(dllexport)
    ... I would like to know if there would be any meaning of declaring an exported function as inline? ... I am writing a dynamic libraryto hold my trace functions and for performance reason could I declare them inlined? ...
    (microsoft.public.vc.mfc)
  • Re: Meaning of iniline in declspec(dllexport)
    ... Yeah but David asking is it still inline? ... I can't see how an exported function can be ... the compiler ignores the import attribute and inlines X::f: ... __declspecvoid g; ...
    (microsoft.public.vc.mfc)
  • Re: Cleanup possibility in asm-i386/string.h
    ... Just declaring them as normal externs will cause ... gcc to use its builtin expansions, which are typically better than these old inline ...
    (Linux-Kernel)
  • Re: Disadvantage of using inline
    ... Declaring a function as 'inline' never meant that is has no "independent ... The decision to inline a call is made by the compiler on a per-call ... >> machines, there are so few registers that tying one up is stupid), ...
    (comp.lang.c)
  • Re: about inline functions
    ... Yes and no. 'inline' is just a hint to the compiler. ... A static function, often doesn't have to be an actual function - it could be in-lined at each call, and a good optimizing compiler will do just that, taking advantage of the as-if rule. ... However, if you have a function for which 'inline' is a good idea, it's often the case that simply declaring it 'static' without the 'inline' keyword is sufficient to allow the compiler to perform this optimization. ...
    (comp.lang.c)