This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50134] -Wmissing-prototypes doesn't work for C++
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 May 2012 12:21:36 +0000
- Subject: [Bug c++/50134] -Wmissing-prototypes doesn't work for C++
- Auto-submitted: auto-generated
- References: <bug-50134-4@http.gcc.gnu.org/bugzilla/>
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.