From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18658 invoked by alias); 11 Aug 2007 16:40:54 -0000 Received: (qmail 18625 invoked by uid 22791); 11 Aug 2007 16:40:52 -0000 X-Spam-Check-By: sourceware.org Received: from caip.rutgers.edu (HELO caip.rutgers.edu) (128.6.236.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Aug 2007 16:40:50 +0000 Received: from caipclassic.rutgers.edu (caipclassic.rutgers.edu [128.6.237.54]) by caip.rutgers.edu (8.13.8/8.13.5) with ESMTP id l7BGehMp014760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Aug 2007 12:40:43 -0400 Date: Sat, 11 Aug 2007 16:40:00 -0000 From: "Kaveh R. GHAZI" To: Richard Kenner cc: gcc-patches@gcc.gnu.org Subject: Re: [Ada PATCH INSTALLED]: constifications In-Reply-To: <10708111503.AA14484@vlsi1.ultra.nyu.edu> Message-ID: References: <10708111503.AA14484@vlsi1.ultra.nyu.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00740.txt.bz2 On Sat, 11 Aug 2007, Richard Kenner wrote: > Thanks for doing this. Two minor issues: > > > + const_tree const field1 = * (const_tree const*) rt1; > > + const_tree const field2 = * (const_tree const*) rt2; > > Please fix the missing blank before the second "*". > > > + const int ret = tree_int_cst_compare (bit_position (field1), bit_position (field2)); > > Isn't this line too long? > > The same problems are in utils2.c. Fixed. Index: ChangeLog =================================================================== --- ChangeLog (revision 127358) +++ ChangeLog (working copy) @@ -1,5 +1,9 @@ 2007-08-11 Kaveh R. Ghazi + * decl.c, utils2.c: Fix whitespace in last change. + +2007-08-11 Kaveh R. Ghazi + * decl.c (compare_field_bitpos): Constify. * utils2.c (compare_elmt_bitpos): Likewise. Index: decl.c =================================================================== --- decl.c (revision 127358) +++ decl.c (working copy) @@ -5847,9 +5847,10 @@ static int compare_field_bitpos (const PTR rt1, const PTR rt2) { - const_tree const field1 = * (const_tree const*) rt1; - const_tree const field2 = * (const_tree const*) rt2; - const int ret = tree_int_cst_compare (bit_position (field1), bit_position (field2)); + const_tree const field1 = * (const_tree const *) rt1; + const_tree const field2 = * (const_tree const *) rt2; + const int ret + = tree_int_cst_compare (bit_position (field1), bit_position (field2)); return ret ? ret : (int) (DECL_UID (field1) - DECL_UID (field2)); } Index: utils2.c =================================================================== --- utils2.c (revision 127358) +++ utils2.c (working copy) @@ -1542,11 +1542,12 @@ static int compare_elmt_bitpos (const PTR rt1, const PTR rt2) { - const_tree const elmt1 = * (const_tree const*) rt1; - const_tree const elmt2 = * (const_tree const*) rt2; + const_tree const elmt1 = * (const_tree const *) rt1; + const_tree const elmt2 = * (const_tree const *) rt2; const_tree const field1 = TREE_PURPOSE (elmt1); const_tree const field2 = TREE_PURPOSE (elmt2); - const int ret = tree_int_cst_compare (bit_position (field1), bit_position (field2)); + const int ret + = tree_int_cst_compare (bit_position (field1), bit_position (field2)); return ret ? ret : (int) (DECL_UID (field1) - DECL_UID (field2)); }