This is the mail archive of the
mailing list for the GCC project.
Re: [patch] fix _OBJC_Module defined but not used warning
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Iain Sandoe <iain at codesourcery dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, GCC Mailing List <gcc at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 08 Jun 2015 06:23:37 -0400
- Subject: Re: [patch] fix _OBJC_Module defined but not used warning
- Authentication-results: sourceware.org; auth=none
- References: <5571F319 dot 205 at redhat dot com> <m2k2vf253a dot fsf at linux-m68k dot org> <55742CFB dot 2060209 at redhat dot com> <CD7A2C7C-775A-4F74-BC22-DFEBFCEADCC8 at codesourcery dot com>
On 06/08/2015 04:03 AM, Iain Sandoe wrote:
On 7 Jun 2015, at 12:37, Aldy Hernandez wrote:
On 06/07/2015 06:19 AM, Andreas Schwab wrote:
FAIL: obj-c++.dg/try-catch-5.mm -fgnu-runtime (test for excess errors)
<built-in>: warning: '_OBJC_Module' defined but not used [-Wunused-variable]
check_global_declarations is called for more symbols now. All the defined but not used errors I've seen in development have been legitimate. For tests, the tests should be fixed. For built-ins such as these, does the attached fix the problem?
It is up to the objc maintainers, we can either fix this with the attached patch,
The current patch is OK.
or setting DECL_IN_SYSTEM_HEADER.
This seems a better long-term idea; however, I would prefer to go through all the cases where it would be applicable (including for the NeXT runtime) and apply that change as a coherent patch. At the moment dealing with the NeXT stuff is a bit hampered by pr66448.
On my list next.