[PING^2] [C/C++] PR c/4076 -Wunused doesn't warn about static function only called by itself

Nathan Sidwell nathan@codesourcery.com
Mon Mar 19 12:16:00 GMT 2007


Manuel López-Ibáñez wrote:

> I can copy the condition. Much better, I can put it inside mark_used
> so we don't have to duplicate it everywhere. 

that seems a much better approach :)

> It seems that check_global_declarations, which is the one that emits
> the Wunused-function warnings, is not called for functions in an
> anonymous namespace. I tried finding where the decision is made
> without any success. Any ideas?

sorry, nothing comes to mind.  It is an orthogonal issue though, IMHO.

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc-patches mailing list