Gabriel Dos Reis <g...@integrable-solutions.net> writes: > On Fri, Aug 19, 2011 at 11:17 PM, Ian Lance Taylor <i...@google.com> wrote: >> 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. > > So that is -Wmissing-declaration if I understand correctly?
Hmmm, you're right, -Wmissing-declarations seems to be equivalent to -Wmissing-prototypes when using C++. Sorry I missed that. Ian