Patchwork Remove INVALID_PARAM_VAL

login
register
mail settings
Submitter Jie Zhang
Date July 23, 2010, 10:36 a.m.
Message ID <4C4970C5.5050902@codesourcery.com>
Download mbox | patch
Permalink /patch/59763/
State New
Headers show

Comments

Jie Zhang - July 23, 2010, 10:36 a.m.
Since we now check option value using its min_value and max_value, we 
don't need to assert that option value not be INVALID_PARAM_VAL. This 
patch removes the assert and INVALID_PARAM_VAL. Bootstrap is OK. I think 
it's safe without a full regression testing. Is it OK?


Regards,

Patch


	* params.c (set_param_value): Remove use of INVALID_PARAM_VAL.
	* params.h (INVALID_PARAM_VAL): Don't define.

Index: params.c
===================================================================
--- params.c	(revision 162448)
+++ params.c	(working copy)
@@ -58,9 +58,6 @@  set_param_value (const char *name, int v
 {
   size_t i;
 
-  /* Make sure nobody tries to set a parameter to an invalid value.  */
-  gcc_assert (value != INVALID_PARAM_VAL);
-
   /* Scan the parameter table to find a matching entry.  */
   for (i = 0; i < num_compiler_params; ++i)
     if (strcmp (compiler_params[i].option, name) == 0)
Index: params.h
===================================================================
--- params.h	(revision 162448)
+++ params.h	(working copy)
@@ -33,10 +33,6 @@  along with GCC; see the file COPYING3.
 #ifndef GCC_PARAMS_H
 #define GCC_PARAMS_H
 
-/* No parameter shall have this value.  */
-
-#define INVALID_PARAM_VAL (-1)
-
 /* The information associated with each parameter.  */
 
 typedef struct param_info