This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] fix 64-bit warnings
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Sep 2002 12:06:31 -0700
- Subject: [tree-ssa] fix 64-bit warnings
* function.c (insns_for_mem_hash): Cast to size_t first.
* tree-dfa.c (num_referenced_vars): Unsigned long, not size_t.
(dump_referenced_vars): Use %lu for it.
(dump_ref): Use HOST_WIDE_INT_PRINT_DEC.
* tree-nomudflap.c (mudflap_c_function): Use ATTRIBUTE_UNUSED.
(mudflap_enqueue_decl, mudflap_enqueue_constant): Likewise.
* tree-ssa-pre.c (compute_idfs): Cast to size_t first.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.374.2.5
diff -c -p -d -u -r1.374.2.5 function.c
--- function.c 4 Sep 2002 01:37:06 -0000 1.374.2.5
+++ function.c 19 Sep 2002 18:59:05 -0000
@@ -3283,7 +3283,7 @@ insns_for_mem_hash (k)
{
/* Use the address of the key for the hash value. */
struct insns_for_mem_entry *m = (struct insns_for_mem_entry *) k;
- return (hashval_t) m->key;
+ return (hashval_t)(size_t) m->key;
}
/* Return non-zero if K1 and K2 (two REGs) are the same. */
Index: tree-alias-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-alias-common.c,v
retrieving revision 1.1.2.2
diff -c -p -d -u -r1.1.2.2 tree-alias-common.c
--- tree-alias-common.c 9 Sep 2002 23:21:01 -0000 1.1.2.2
+++ tree-alias-common.c 19 Sep 2002 18:59:05 -0000
@@ -657,13 +657,14 @@ display_points_to_set_helper (tvar)
}
fprintf (stderr, " }\n");
}
+
static int
display_points_to_set (node, data)
splay_tree_node node;
void *data ATTRIBUTE_UNUSED;
{
-/* Display the points to set for the given alias_typevar (in the
- splay tree node.) */
+ /* Display the points to set for the given alias_typevar
+ (in the splay tree node.) */
display_points_to_set_helper ((alias_typevar)node->value);
return 0;
}
Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.20
diff -c -p -d -u -r1.1.4.20 tree-dfa.c
--- tree-dfa.c 19 Sep 2002 17:57:04 -0000 1.1.4.20
+++ tree-dfa.c 19 Sep 2002 18:59:05 -0000
@@ -74,7 +74,7 @@ static void add_ptr_may_refs PARAMS ((vo
/* Global declarations. */
/* Array of all variables referenced in the function. */
-size_t num_referenced_vars;
+unsigned long num_referenced_vars;
varray_type referenced_vars;
/* List of all call sites in the current function. */
@@ -1071,7 +1071,9 @@ dump_ref (outf, prefix, ref, indent, det
else
fprintf (outf, "nil");
- fprintf (outf, "): line %d, bb %d, id %d, ", lineno, bbix, ref_id (ref));
+ fprintf (outf, "): line %d, bb %d, id ", lineno, bbix);
+ fprintf (outf, HOST_WIDE_INT_PRINT_DEC, ref_id (ref));
+ fprintf (outf, ", ");
if (ref_expr (ref))
print_c_node (outf, ref_expr (ref));
@@ -1224,7 +1226,7 @@ dump_referenced_vars (file)
{
size_t i;
- fprintf (file, "\n;; Function %s: %d referenced variables\n\n",
+ fprintf (file, "\n;; Function %s: %lu referenced variables\n\n",
IDENTIFIER_POINTER (DECL_NAME (current_function_decl)),
num_referenced_vars);
Index: tree-nomudflap.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-nomudflap.c,v
retrieving revision 1.1.2.2
diff -c -p -d -u -r1.1.2.2 tree-nomudflap.c
--- tree-nomudflap.c 20 Aug 2002 19:21:40 -0000 1.1.2.2
+++ tree-nomudflap.c 19 Sep 2002 18:59:05 -0000
@@ -45,7 +45,7 @@ Software Foundation, 59 Temple Place - S
void
mudflap_c_function (t)
- tree t;
+ tree t ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -53,8 +53,8 @@ mudflap_c_function (t)
void
mudflap_enqueue_decl (obj, label)
- tree obj;
- const char *label;
+ tree obj ATTRIBUTE_UNUSED;
+ const char *label ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -62,8 +62,8 @@ mudflap_enqueue_decl (obj, label)
void
mudflap_enqueue_constant (obj, label)
- tree obj;
- const char *label;
+ tree obj ATTRIBUTE_UNUSED;
+ const char *label ATTRIBUTE_UNUSED;
{
abort ();
}
Index: tree-ssa-pre.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-pre.c,v
retrieving revision 1.1.4.17
diff -c -p -d -u -r1.1.4.17 tree-ssa-pre.c
--- tree-ssa-pre.c 18 Sep 2002 22:50:47 -0000 1.1.4.17
+++ tree-ssa-pre.c 19 Sep 2002 18:59:05 -0000
@@ -204,12 +204,12 @@ compute_idfs (dfs, stmt)
sbitmap_zero (inworklist);
sbitmap_zero (idf);
block = bb_for_stmt (stmt);
- fibheap_insert (worklist, block->index, (void *)block->index);
+ fibheap_insert (worklist, block->index, (void *)(size_t)block->index);
SET_BIT (inworklist, block->index);
while (!fibheap_empty (worklist))
{
- int a = (int) fibheap_extract_min (worklist);
+ int a = (size_t) fibheap_extract_min (worklist);
sbitmap_a_or_b (idf, idf, dfs[a]);
EXECUTE_IF_SET_IN_SBITMAP (dfs[a], 0, i,
{
@@ -1584,6 +1584,7 @@ down_safety (ei)
reset_down_safe (phi_operand (phi, block2));
}
}
+
static bool
requires_edge_placement (phi)
tree_ref phi;