[Ada PATCH INSTALLED]: constifications
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Sat Aug 11 16:40:00 GMT 2007
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 <ghazi@caip.rutgers.edu>
+ * decl.c, utils2.c: Fix whitespace in last change.
+
+2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
* 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));
}
More information about the Gcc-patches
mailing list