This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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) == FUNCTION_DECL)
> >  		? OPT_Wunused_function
> >  		: (TREE_READONLY (decl)
> >-		   ? OPT_Wunused_const_variable
> >+		   ? OPT_Wunused_const_variable_
> Typo here?

The _ stands for = from the option name, as -Wunused-const-variable
is an alias to -Wunused-const-variable=2, I think we want the trailing
underscore.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]