This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix -Wunused-function (PR debug/66869)
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Jan 2016 21:51:34 -0500
- Subject: Re: [C++ PATCH] Fix -Wunused-function (PR debug/66869)
- Authentication-results: sourceware.org; auth=none
- References: <20160125203829 dot GP3017 at tucnak dot redhat dot com> <CAFiYyc12VJd=HcmH6YsnwVWinfzBnMzq-WyujU85eg05LCUReg at mail dot gmail dot com> <20160126161813 dot GB3017 at tucnak dot redhat dot com> <CAFiYyc1Kn++hPBBXw1NcjROxpTJbBdPy4Eu=ZXfMmPkhQ8H0=A at mail dot gmail dot com> <20160127185159 dot GT3017 at tucnak dot redhat dot com> <56A91A7A dot 3060700 at redhat dot com> <20160128201506 dot GG3017 at tucnak dot redhat dot com>
On 01/28/2016 03:15 PM, Jakub Jelinek wrote:
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_INITIAL (decl) == 0
+ && DECL_EXTERNAL (decl)
+ && !TREE_PUBLIC (decl)
+ && !DECL_ARTIFICIAL (decl)
+ && !TREE_NO_WARNING (decl))
Do we need to check both DECL_INITIAL and DECL_EXTERNAL?
Jason