This is the mail archive of the
mailing list for the GCC project.
Re: [PING^2] [C/C++] PR c/4076 -Wunused doesn't warn about static function only called by itself
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 Sidwell :: http://www.codesourcery.com :: CodeSourcery
email@example.com :: http://www.planetfall.pwp.blueyonder.co.uk