Gabriel Dos Reis <g...@integrable-solutions.net> writes:

> what would it do?  There is no notion of `prototype' in C++ (as C
> programmers understand it).
> So, what would it mean to warn about something we can't take the
> negation of? ;-)

-Wmissing-prototypes means that if the compiler sees a globally visible
function definition, it warns if no previous definition of the function
was seen.  This is a way of ensuring that the file which defines a
function #includes the header file which declares the function, thus
ensuring that the definition matches the declaration.  Although the name
is wrong for C++, the option is meaningful for C++ just as it is for C.

(I actually sent a patch implementing this option to RMS back when I was
first starting to work with gcc, although I think he rewrote it.)

Ian

Reply via email to