http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-30
14:29:18 UTC ---
(In reply to comment #6)
> On Fri, 30 Sep 2011, redi at gcc dot gnu.org wrote:
>
> > I'm not sure what "Do so even if the definition itself provides a
> > prototype."
> > means in the context of C++.
>
> That's simple enough: it's a style warning: a global function should be
> declared in a header, so warn for
>
> int
> f (void)
> {
> return 0;
> }
>
> if there was no previous declaration for f.
I get that part.
> (For C++, the definition and
> any previous declaration will always provide a prototype.)
Exactly, that's my point. But I had missed the fact that the option is valid
in C as well as C++.
My uncertainty was about what that sentence means in the context of C++, and
the answer is nothing, because there are no definitions which do not provide a
prototype in C++ (ignoring the fact that "prototype" doesn't mean anything in
C++).