From 34c6743caf207e4b0a8d6bb07c01d9c4d4376d70 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 8 Sep 2009 15:26:50 +0000 Subject: tree-ssa-reassoc.c (find_operand_rank): Cast pointer via intptr_t to long type. 2009-09-08 Kai Tietz * 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 --- gcc/tree-ssa-reassoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-reassoc.c') diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index d97f513..55ce2f6 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -192,7 +192,7 @@ static inline long find_operand_rank (tree 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. */ @@ -204,7 +204,7 @@ insert_operand_rank (tree e, long rank) gcc_assert (rank > 0); slot = pointer_map_insert (operand_rank, e); gcc_assert (!*slot); - *slot = (void *) rank; + *slot = (void *) (intptr_t) rank; } /* Given an expression E, return the rank of the expression. */ -- cgit v1.1