This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16402] g++ -Wmissing-declarations doesn't work
- From: "millerp at canb dot auug dot org dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2004 12:21:57 -0000
- Subject: [Bug c++/16402] g++ -Wmissing-declarations doesn't work
- References: <20040707082444.16402.millerp@canb.auug.org.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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