This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap with -Wmissing-prototypes doesn't work for C++


Gabriel Dos Reis <gdr@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]