Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Mark Wielaard
On Tue, 2016-02-23 at 09:51 +, Manuel López-Ibáñez wrote: > On 23/02/16 08:56, Jakub Jelinek wrote: > > On Tue, Feb 23, 2016@09:53:57AM +0100, Mark Wielaard wrote: > >> --- a/gcc/ChangeLog > >> +++ b/gcc/ChangeLog > >> @@ -1,3 +1,10 @@ > >> +2016-02-23 Mark Wielaard > >> + Jakub Jelinek

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Jakub Jelinek
On Tue, Feb 23, 2016 at 09:51:05AM +, Manuel López-Ibáñez wrote: > >>diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c > >>index 27a073a..8b3fddc 100644 > >>--- a/gcc/cgraphunit.c > >>+++ b/gcc/cgraphunit.c > >>@@ -917,6 +917,7 @@ walk_polymorphic_call_targets (hash_set > >>*reachable_call_targ

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Manuel López-Ibáñez
On 23/02/16 08:56, Jakub Jelinek wrote: On Tue, Feb 23, 2016@09:53:57AM +0100, Mark Wielaard wrote: --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-02-23 Mark Wielaard + Jakub Jelinek + + PR c/69911 + * cgraphunit.c (check_global_declaration): Check main

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Jakub Jelinek
On Tue, Feb 23, 2016 at 09:53:57AM +0100, Mark Wielaard wrote: > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,10 @@ > +2016-02-23 Mark Wielaard > + Jakub Jelinek > + > + PR c/69911 > + * cgraphunit.c (check_global_declaration): Check main_input_filename > + and DE

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Mark Wielaard
On Tue, 2016-02-23 at 09:26 +0100, Jakub Jelinek wrote: > On Tue, Feb 23, 2016 at 08:55:40AM +0100, Mark Wielaard wrote: > > On Mon, 2016-02-22 at 19:20 -0800, H.J. Lu wrote: > > > It caused: > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69911 > > > > Apologies. Apparently main_input_f

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-23 Thread Jakub Jelinek
On Tue, Feb 23, 2016 at 08:55:40AM +0100, Mark Wielaard wrote: > On Mon, 2016-02-22 at 19:20 -0800, H.J. Lu wrote: > > It caused: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69911 > > Apologies. Apparently main_input_filename can be NULL. I am not entirely > sure when that happens. Or ho

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread Mark Wielaard
On Mon, 2016-02-22 at 19:20 -0800, H.J. Lu wrote: > It caused: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69911 Apologies. Apparently main_input_filename can be NULL. I am not entirely sure when that happens. Or how I failed to see that test failure. I think I didn't have java enabled, caus

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread H.J. Lu
On Mon, Feb 22, 2016 at 2:43 PM, Mark Wielaard 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. Unf

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread Mark Wielaard
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

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread Jeff Law
On 02/22/2016 12:00 PM, Jakub Jelinek wrote: On Mon, Feb 22, 2016 at 11:57:56AM -0700, Jeff Law wrote: 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)

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread Jakub Jelinek
On Mon, Feb 22, 2016 at 11:57:56AM -0700, Jeff Law wrote: > >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) =

Re: [PATCH] PR28901 Add two levels for -Wunused-const-variable.

2016-02-22 Thread Jeff Law
On 02/20/2016 06:42 PM, Mark Wielaard wrote: There is some controversy about enabling -Wunused-const-variable for all unused static const variables because some feel there are too many errors exposed in header files. Create two levels for -Wunused-const-variable. One level to only check for unuse