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++/16402] g++ -Wmissing-declarations doesn't work


------- 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


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