#383 include/inttypes.h leaks inline declaration


include/inttypes.h declares an inline function without protection of __NO_INLINE__.

The solution is not universal in the headers, since some headers like string.h use __STRICT_ANSI__ and others use __NO_INLINE__ to avoid inline declarations in headers.


  • Gregory McGarry

    Gregory McGarry - 2008-07-06

    patch to include/inttypes.h

  • Danny Smith

    Danny Smith - 2008-07-07

    Logged In: YES
    Originator: NO

    Why I is the __NO_INLINE__ guard necessary again? Is this a PCC requirement? If the GNU compiler defines __NO_INLINE__ then it will just use the extern definition anyway.


  • Gregory McGarry

    Gregory McGarry - 2008-07-07

    Logged In: YES
    Originator: YES

    I guess it was originally introduced for pre-c99 ansi compilers. Newer changes to mingw-runtime haven't preserved the __NO_INLINE__ guard.

    There are currently discussions on the pcc list that concludes that declaring an extern inline function in a header and later defining an external linkage in the same transactional unit is not c99 compliant. I am not sure I agree, but I need to __NO_INLINE__ to build the mingwex library.

    This file isn't the only header. I have attached a newer version of the patch for all headers.
    File Added: diff.txt

  • Gregory McGarry

    Gregory McGarry - 2008-07-07

    patch to all headers to guard inlines with NO_INLINE

  • Chris Sutcliffe

    Chris Sutcliffe - 2009-07-18

    Your patch has been accepted and is now commited to CVS. You should expect to see it in the next release.

  • Chris Sutcliffe

    Chris Sutcliffe - 2009-07-18
    • assigned_to: nobody --> ir0nh34d
    • status: open --> closed-accepted

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks