This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove INVALID_PARAM_VAL
- From: Jie Zhang <jie at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 Jul 2010 18:36:53 +0800
- Subject: [PATCH] Remove INVALID_PARAM_VAL
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,
--
Jie Zhang
CodeSourcery
* 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