Commit 34c6743c by Kai Tietz Committed by Kai Tietz

tree-ssa-reassoc.c (find_operand_rank): Cast pointer via intptr_t to long type.

2009-09-08  Kai Tietz  <kai.tietz@onevision.com>

        * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
        via intptr_t to long type.
        (insert_operand_rank): Cast long type via intptr_t to
        pointer type.
        * genattrtab.c (RTL_HASH): Use intptr_t to cast from
        pointer to scalar.
        * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
        from pointer to unsigned via uintptr_t.

From-SVN: r151515
parent 7c2a2dbf
2009-09-08 Kai Tietz <kai.tietz@onevision.com> 2009-09-08 Kai Tietz <kai.tietz@onevision.com>
* tree-ssa-reassoc.c (find_operand_rank): Cast pointer
via intptr_t to long type.
(insert_operand_rank): Cast long type via intptr_t to
pointer type.
* genattrtab.c (RTL_HASH): Use intptr_t to cast from
pointer to scalar.
* c-pretty-print.c (pp_c_tree_decl_identifier): Cast
from pointer to unsigned via uintptr_t.
* configure.ac (GCC_STDINT_TYPES): Initialize intptr_t, * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T, uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
and HAVE_INTPTR_T. and HAVE_INTPTR_T.
......
...@@ -2235,7 +2235,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t) ...@@ -2235,7 +2235,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t)
else else
{ {
static char xname[8]; static char xname[8];
sprintf (xname, "<U%4x>", ((unsigned)((unsigned long)(t) & 0xffff))); sprintf (xname, "<U%4x>", ((unsigned)((uintptr_t)(t) & 0xffff)));
name = xname; name = xname;
} }
......
...@@ -319,7 +319,7 @@ static struct attr_hash *attr_hash_table[RTL_HASH_SIZE]; ...@@ -319,7 +319,7 @@ static struct attr_hash *attr_hash_table[RTL_HASH_SIZE];
/* Here is how primitive or already-shared RTL's hash /* Here is how primitive or already-shared RTL's hash
codes are made. */ codes are made. */
#define RTL_HASH(RTL) ((long) (RTL) & 0777777) #define RTL_HASH(RTL) ((intptr_t) (RTL) & 0777777)
/* Add an entry to the hash table for RTL with hash code HASHCODE. */ /* Add an entry to the hash table for RTL with hash code HASHCODE. */
......
...@@ -192,7 +192,7 @@ static inline long ...@@ -192,7 +192,7 @@ static inline long
find_operand_rank (tree e) find_operand_rank (tree e)
{ {
void **slot = pointer_map_contains (operand_rank, e); void **slot = pointer_map_contains (operand_rank, e);
return slot ? (long) *slot : -1; return slot ? (long) (intptr_t) *slot : -1;
} }
/* Insert {E,RANK} into the operand rank hashtable. */ /* Insert {E,RANK} into the operand rank hashtable. */
...@@ -204,7 +204,7 @@ insert_operand_rank (tree e, long rank) ...@@ -204,7 +204,7 @@ insert_operand_rank (tree e, long rank)
gcc_assert (rank > 0); gcc_assert (rank > 0);
slot = pointer_map_insert (operand_rank, e); slot = pointer_map_insert (operand_rank, e);
gcc_assert (!*slot); gcc_assert (!*slot);
*slot = (void *) rank; *slot = (void *) (intptr_t) rank;
} }
/* Given an expression E, return the rank of the expression. */ /* Given an expression E, return the rank of the expression. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment