This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: Support -Wmissing-declarations in C++
Gabriel Dos Reis <email@example.com> writes:
> | It makes sense in the C++ world too, though I agree that
> | it is not as important in C. This option applies only to global
> | functions, not to classes, nor to functions declared within classes
> | (aka methods).
> and not to (implicit) specializations of templates, etc.
> Which makes it nearly pointless.
Some people write C++ as a "better C". For those people, this option
> Idiomatic C++ is based on the notion that you don't need to declare a
> function before defining it -- and there are lot of functions you can't
> declare that way. What this option will do is replicate another
> -Weffc++ fiasco.
I disagree. Nobody is going to accidentally turn on this option
thinking that it is useful, unless they understand what it does. And,
even if they do, it is unlikely to ever fire for them if they write
your "idiomatic C++."