[Bug c++/16402] g++ -Wmissing-declarations doesn't work
millerp at canb dot auug dot org dot au
gcc-bugzilla@gcc.gnu.org
Wed Jul 7 12:21:00 GMT 2004
------- Additional Comments From millerp at canb dot auug dot org dot au 2004-07-07 12:21 -------
/*
* Example of missing warning: gcc -Wmissing-declarations will give a warning
with this code, g++ -Wmissing-declarations will not.
*
* The documentation for this option says "Warn if a global function is defined
without a previous declaration. Do so even if the definition itself provides a
prototype. Use this option to detect global functions that are not declared in
header files."
*
* For C++ the word "function" needs to cover operator declarator / definitions
as well.
*/
void function(){}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16402
More information about the Gcc-bugs
mailing list