#35 __inline__ ignored when no optimization

closed-fixed
nobody
2001-08-10
2001-04-09
Danny Smith
No

Recent addition of two inlined functions to winnt.h
(GetCurrentFiber and GetFiberData) results in multiple
definitions when code is compiled without optimization.

As is says in GCC doc's:
"GNU C does not inline any functions when not
optimizing"

If these functions were also exported from dll, the
extern __inline__ construct would fix. But I don't
believe they are

Danny

Discussion

  • Danny Smith

    Danny Smith - 2001-04-09

    Logged In: YES
    user_id=11494

    OK, here is one possible solotion:
    1) Change __inline__ to extern __inline__ in winnt.h

    2) Put the the code for GetCurrentFiber and GetFiberData
    into a separate file called, say, fiber.c.

    3) Compile and add fiber.o to libkernel32.a as a static
    object (which is only linked in when there is no
    optimization).

    Unless I hear any rude noises or loud guffaws, I'll work up
    a patch to that effect.

    Danny

     
  • Danny Smith

    Danny Smith - 2001-04-10

    Logged In: YES
    user_id=11494

    Another side effect of the use of inline:
    libdinput.a, libdxguid.a, liblargeint.a, libscrnsave.a,
    and libscrnsavw.a now all contain object code for
    GetCurrentFiber and GetFiberData because of the inline
    definition of these functions in winnt.h. Note that these
    libs all contain statically linked objects. Recompiling
    with the extern inline fix to winnt.h will clean up.

     
  • Danny Smith

    Danny Smith - 2001-08-10
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks