Changeset 21523 for trunk/include/odin.h


Ignore:
Timestamp:
Dec 10, 2010, 5:09:09 PM (15 years ago)
Author:
dmik
Message:

Fixed INLINE: GCC always generates non-inline bodies for pure inline functions. So, those of them placed in headers must also be either static or extern to avoid duplicate symbols at link time. We use static because this causes the compiler to automatically generate local non-inlined bodies in case when inlining is not possible (for example, in debug builds) while extern would requires explicit body generation in a separate compilation unit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/odin.h

    r21400 r21523  
    8585  #define WINAPI    __stdcall
    8686  #define PASCAL    __stdcall
    87   #define INLINE    __inline__
     87  #define INLINE    static __inline__
    8888  #define UNALIGNED
    8989  #if (__GNUC__ < 4)
Note: See TracChangeset for help on using the changeset viewer.