This is the mail archive of the gcc-bugs@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]

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


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.


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