[Bug c++/50134] -Wmissing-prototypes doesn't work for C++

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 15 12:24:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-05-15 12:21:36 UTC ---
(In reply to comment #6)
> 
> int f();
> int f(void) { return 0; }
> 
> gets a warning with -Wmissing-prototypes but not -Wmissing-declarations, 
> because "int f();" is a non-prototype declaration in C.

Honestly, I don't see the purpose of this distinction in modern C. I would
rather have -Wmissing-declarations be an alias of -Wmissing-prototypes in C,
and simplify both GCC and the life of users.



More information about the Gcc-bugs mailing list