diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-08-11 13:34:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-08-11 13:34:32 +0000 |
commit | 39595763534dcdf037f4796faaf893516d8ad2e9 (patch) | |
tree | aefc262670ad2678d02adaa90a83b83be65f0d1f /gcc/ada/decl.c | |
parent | ea7c218e4605228d20539d8f6af4875623bb3127 (diff) | |
download | gcc-39595763534dcdf037f4796faaf893516d8ad2e9.zip gcc-39595763534dcdf037f4796faaf893516d8ad2e9.tar.gz gcc-39595763534dcdf037f4796faaf893516d8ad2e9.tar.bz2 |
decl.c (compare_field_bitpos): Constify.
* decl.c (compare_field_bitpos): Constify.
* utils2.c (compare_elmt_bitpos): Likewise.
From-SVN: r127358
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 86a8dd7..5c202f0e 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -5847,11 +5847,10 @@ is_variable_size (tree type) static int compare_field_bitpos (const PTR rt1, const PTR rt2) { - tree field1 = * (tree *) rt1; - tree field2 = * (tree *) rt2; - int ret; + 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)); - ret = tree_int_cst_compare (bit_position (field1), bit_position (field2)); return ret ? ret : (int) (DECL_UID (field1) - DECL_UID (field2)); } |