This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Martin Sebor <msebor at gmail dot com>, Steve Ellcey <sellcey at imgtec dot com>, Jakub Jelinek <jakub at redhat dot com>, Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Date: Mon, 22 Feb 2016 19:20:49 -0800
- Subject: Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.
- Authentication-results: sourceware.org; auth=none
- References: <5603E4D3 dot 4050806 at redhat dot com> <1456018952-25270-1-git-send-email-mjw at redhat dot com> <56CB5A34 dot 8030301 at redhat dot com> <20160222224312 dot GK2586 at blokker dot redhat dot com>
On Mon, Feb 22, 2016 at 2:43 PM, Mark Wielaard <firstname.lastname@example.org> wrote:
> On Mon, Feb 22, 2016 at 11:57:56AM -0700, Jeff Law wrote:
>> On 02/20/2016 06:42 PM, Mark Wielaard wrote:
>> Note that given the discussion in the BZ, I'm going to consider this a
>> regression and thus eligible for the trunk.
> Thanks. Unfortunately new warnings always seem to make some people
> unhappy (even when others are happy and see them as useful). Hopefully
> this compromise makes it so that nobody sees this warning as regression.
>> >diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
>> >index 0a745f0..27a073a 100644
>> >--- a/gcc/cgraphunit.c
>> >+++ b/gcc/cgraphunit.c
>> >@@ -971,7 +974,7 @@ check_global_declaration (symtab_node *snode)
>> > (TREE_CODE (decl) == FUNCTION_DECL)
>> > ? OPT_Wunused_function
>> > : (TREE_READONLY (decl)
>> >- ? OPT_Wunused_const_variable
>> >+ ? OPT_Wunused_const_variable_
>> Typo here?
>> If that's not a typo, then just say so and this is approved.
> As Jakub already explained that was deliberate. It is how a warning
> option that can take a level is represented. Pushed.