#312 -Wmissing-prototypes causes stdio.h problems

gcc (462)
Jim Barton

In mingw/include/stdio.h, the inline declarations of
and vsnwprintf() are not preceeded by a separate prototype
declaration. When using the -Wmissing-prototypes option on
gcc, this causes a warning.

I like to compile with all warnings on, and treat
warnings as
errors, so this is a problem. It is easily corrected by
supplying a prototype.


  • Luke Dunstan

    Luke Dunstan - 2003-03-10
    • labels: 456608 --> mingw runtime (deprecated use WSL)
    • priority: 5 --> 1
    • status: open --> pending-wont-fix
  • Luke Dunstan

    Luke Dunstan - 2003-03-10

    Logged In: YES

    See this message about a previous report of the same


    You didn't say which compiler version you are using, and
    since I can't reproduce this with current versions I assume
    you are using GCC 2, so the message above will explain why
    this will not be fixed unless somebody submits a patch.

  • Earnie Boyd

    Earnie Boyd - 2003-03-10
    • status: pending-wont-fix --> closed-wont-fix
  • Jim Barton

    Jim Barton - 2003-03-12

    Logged In: YES

    Here is the command line I use. This is with the 3.2 compilers:

    c:/mingw/bin/gcc -Bc:/mingw/bin/ -nostdinc -fno-inline -O1
    -g -Wall -Wcast-qual -Wconversion -Wimplicit
    -Wmissing-declarations -Wmissing-prototypes
    -Woverloaded-virtual -Wstrict-prototypes -Wundef -W
    -Wunused -fno-exceptions -mthreads -DDEBUG
    -DPPC=1 -DX86=2 -DMIPS=3 -DSPARC=4 -Ic:/mingw/include
    -I../../common/include -I../../obj/dev-win32/include
    -I../lib -I. -o examples/outline.o -c ../examples/outline.c
    In file included from ../examples/outline.c:24:
    c:/mingw/include/stdio.h:226: warning: no previous prototype
    for `vsnprintf'
    c:/mingw/include/stdio.h:382: warning: no previous prototype
    for `vsnwprintf'
    In file included from ../lib/expat.h:17,
    from ../examples/outline.c:25:
    c:/mingw/include/stdlib.h:301: warning: no previous
    prototype for `strtof'
    c:/mingw/include/stdlib.h:312: warning: no previous
    prototype for `wcstof'

  • Danny Smith

    Danny Smith - 2003-03-14
    • priority: 1 --> 5
    • assigned_to: earnie --> dannysmith
    • status: closed-wont-fix --> open-later
  • Danny Smith

    Danny Smith - 2003-03-14

    Logged In: YES

    I am reopening this because extern __inline__ in
    headers needs to be fixed, but not by simply adding

    As explained by Jim Myers in this post:


    "Roughly, the semantics of plain inline and extern inline
    are swapped between C99 and gnu89. In C99, an inline
    function is exported only if some declaration - possibly
    appearing after the function is defined -
    specifies "extern" or does not specify "inline", whereas
    in gnu89 "extern inline" means the function is not

    Not a problem at the moment because gcc does not
    implement C99 inline semantics correctly, but this will
    need to be addressed when it does.

  • Earnie Boyd

    Earnie Boyd - 2012-10-19
    • status: open-later --> closed-out-of-date
  • Earnie Boyd

    Earnie Boyd - 2012-10-19

    Since we are well past GCC 3 I'm closing this as out-of-date.

  • Earnie Boyd

    Earnie Boyd - 2013-01-27
    • labels: mingw runtime (deprecated use WSL) --> gcc
    • status: closed-out-of-date --> closed
    • resolution: --> fixed
    • category: --> Aged_issue
    • milestone: --> component_package

Log in to post a comment.