-Wmissing-prototypes is broken

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Wed Sep 9 08:43:00 GMT 1998


The docs say

  -Wmissing-prototypes'
     Warn if a global function is defined without a previous prototype
     declaration.  This warning is issued even if the definition itself
     provides a prototype.  The aim is to detect global functions that
     fail to be declared in header files.

but even for the trivial program

  void f(int i) {
      i++;
      }

it does not seem to work like that:

  alkaid% egcs -v
  Reading specs from /sw/swtest/egcs/BSD/lib/gcc-lib/i386-unknown-freebsd2.2.7/egcs-2.92.04/specs
  gcc version egcs-2.92.04 19980907 (gcc2 ss-980609 experimental)
  alkaid% egcs -Wmissing-prototypes -c x.c
  alkaid%

-Wmissing-declarations does not work either.

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/




More information about the Gcc-bugs mailing list