This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/4076] -Wunused doesn't warn about static function only called by itself.
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2007 17:23:05 -0000
- Subject: [Bug c/4076] -Wunused doesn't warn about static function only called by itself.
- References: <bug-4076-1176@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from manu at gcc dot gnu dot org 2007-01-28 17:23 -------
I will submit two patches. The first one will remove the function. Then, I have
to regtest the second one: perhaps we find another unused function!
Steven, if you really think that the case:
static void foo(void)
{
bar ();
}
static void bar(void)
{
foo ();
}
is worth the hassle of dealing with the call graph (which may not be available
unless using a particular -O* switch), please open a new PR about it (and add
me to the CC list).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4076