From patchwork Fri Jul 23 10:36:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhang X-Patchwork-Id: 59763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C71CDB70BE for ; Fri, 23 Jul 2010 20:37:05 +1000 (EST) Received: (qmail 16119 invoked by alias); 23 Jul 2010 10:37:03 -0000 Received: (qmail 16110 invoked by uid 22791); 23 Jul 2010 10:37:02 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 10:36:57 +0000 Received: (qmail 13282 invoked from network); 23 Jul 2010 10:36:56 -0000 Received: from unknown (HELO ?192.168.1.100?) (jie@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jul 2010 10:36:56 -0000 Message-ID: <4C4970C5.5050902@codesourcery.com> Date: Fri, 23 Jul 2010 18:36:53 +0800 From: Jie Zhang User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH] Remove INVALID_PARAM_VAL X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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, * 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