This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Avoid misc. warnings.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Avoid misc. warnings.
- From: Jan van Male <vanmale at fenk dot wau dot nl>
- Date: Wed, 31 Oct 2001 15:15:44 +0200
- Reply-To: vanmale at fenk dot wau dot nl
Hi all,
This fixes several warnings which have been creeping in lately.
Changelog:
2001-10-30 Jan van Male <vanmale@fenk.wau.nl>
* basic-block.h (purge_all_dead_edges): Change `bool' parameter to
`int'.
* cfgrtl.c (purge_all_dead_edges): Likewise and fix spelling error.
* emit-rtl.c (get_mem_attrs): Cast GET_MODE_SIZE to `int' to avoid
warning.
(adjust_address_1): Fix spelling error and add cast to `unsigned
HOST_WIDE_INT' to avoid warning.
(offset_address): Change `HOST_WIDE_INT' parameter to `unsigned
HOST_WIDE_INT' to avoid warning.
* expr.h (offset_address): Likewise.
* expr.c (highest_pow2_factor): Change `HOST_WIDE_INT' return type to
`unsigned HOST_WIDE_INT' to avoid warning.
Index: basic-block.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/basic-block.h,v
retrieving revision 1.127
diff -c -3 -p -r1.127 basic-block.h
*** basic-block.h 2001/10/29 11:45:43 1.127
--- basic-block.h 2001/10/31 13:15:01
*************** extern basic_block force_nonfallthru PAR
*** 638,644 ****
extern bool redirect_edge_and_branch PARAMS ((edge, basic_block));
extern rtx block_label PARAMS ((basic_block));
extern bool forwarder_block_p PARAMS ((basic_block));
! extern bool purge_all_dead_edges PARAMS ((bool));
extern bool purge_dead_edges PARAMS ((basic_block));
extern void find_sub_basic_blocks PARAMS ((basic_block));
extern void find_many_sub_basic_blocks PARAMS ((sbitmap));
--- 638,644 ----
extern bool redirect_edge_and_branch PARAMS ((edge, basic_block));
extern rtx block_label PARAMS ((basic_block));
extern bool forwarder_block_p PARAMS ((basic_block));
! extern bool purge_all_dead_edges PARAMS ((int));
extern bool purge_dead_edges PARAMS ((basic_block));
extern void find_sub_basic_blocks PARAMS ((basic_block));
extern void find_many_sub_basic_blocks PARAMS ((sbitmap));
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 cfgrtl.c
*** cfgrtl.c 2001/10/29 11:45:43 1.7
--- cfgrtl.c 2001/10/31 13:15:02
*************** purge_dead_edges (bb)
*** 1918,1930 ****
}
/* Search all basic blocks for potentionally dead edges and purge them.
- Return true ifif some edge has been elliminated.
- */
-
bool
purge_all_dead_edges (update_life_p)
! bool update_life_p;
{
int i, purged = false;
sbitmap blocks;
--- 1918,1928 ----
}
/* Search all basic blocks for potentionally dead edges and purge them.
+ Return true if some edge has been eliminated. */
bool
purge_all_dead_edges (update_life_p)
! int update_life_p;
{
int i, purged = false;
sbitmap blocks;
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.218
diff -c -3 -p -r1.218 emit-rtl.c
*** emit-rtl.c 2001/10/30 12:41:40 1.218
--- emit-rtl.c 2001/10/31 13:15:02
*************** get_mem_attrs (alias, decl, offset, size
*** 288,294 ****
/* If everything is the default, we can just return zero. */
if (alias == 0 && decl == 0 && offset == 0
&& (size == 0
! || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size)))
&& (align == 1
|| (mode != BLKmode && align == GET_MODE_ALIGNMENT (mode))))
return 0;
--- 288,294 ----
/* If everything is the default, we can just return zero. */
if (alias == 0 && decl == 0 && offset == 0
&& (size == 0
! || (mode != BLKmode && (int) GET_MODE_SIZE (mode) == INTVAL (size)))
&& (align == 1
|| (mode != BLKmode && align == GET_MODE_ALIGNMENT (mode))))
return 0;
*************** adjust_address_1 (memref, mode, offset,
*** 1887,1895 ****
/* Compute the new alignment by taking the MIN of the alignment and the
lowest-order set bit in OFFSET, but don't change the alignment if
OFFSET
! if zero. */
if (offset != 0)
! memalign = MIN (memalign, (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
if (mode != BLKmode)
--- 1887,1896 ----
/* Compute the new alignment by taking the MIN of the alignment and the
lowest-order set bit in OFFSET, but don't change the alignment if
OFFSET
! is zero. */
if (offset != 0)
! memalign = MIN (memalign, (unsigned HOST_WIDE_INT)
! (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
if (mode != BLKmode)
*************** rtx
*** 1913,1919 ****
offset_address (memref, offset, pow2)
rtx memref;
rtx offset;
! HOST_WIDE_INT pow2;
{
rtx new = change_address_1 (memref, VOIDmode,
gen_rtx_PLUS (Pmode, XEXP (memref, 0),
--- 1914,1920 ----
offset_address (memref, offset, pow2)
rtx memref;
rtx offset;
! unsigned HOST_WIDE_INT pow2;
{
rtx new = change_address_1 (memref, VOIDmode,
gen_rtx_PLUS (Pmode, XEXP (memref, 0),
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.369
diff -c -3 -p -r1.369 expr.c
*** expr.c 2001/10/30 12:41:42 1.369
--- expr.c 2001/10/31 13:15:06
*************** static rtx store_field PARAMS ((rtx, HO
*** 164,170 ****
static enum memory_use_mode
get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
static rtx var_rtx PARAMS ((tree));
! static HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
static rtx expand_expr_unaligned PARAMS ((tree, unsigned int *));
static rtx expand_increment PARAMS ((tree, int, int));
static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
--- 164,170 ----
static enum memory_use_mode
get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
static rtx var_rtx PARAMS ((tree));
! static unsigned HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
static rtx expand_expr_unaligned PARAMS ((tree, unsigned int *));
static rtx expand_increment PARAMS ((tree, int, int));
static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
*************** check_max_integer_computation_mode (exp)
*** 6006,6012 ****
/* Return the highest power of two that EXP is known to be a multiple of.
This is used in updating alignment of MEMs in array references. */
! static HOST_WIDE_INT
highest_pow2_factor (exp)
tree exp;
{
--- 6006,6012 ----
/* Return the highest power of two that EXP is known to be a multiple of.
This is used in updating alignment of MEMs in array references. */
! static unsigned HOST_WIDE_INT
highest_pow2_factor (exp)
tree exp;
{
Index: expr.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.h,v
retrieving revision 1.100
diff -c -3 -p -r1.100 expr.h
*** expr.h 2001/10/25 12:55:16 1.100
--- expr.h 2001/10/31 13:15:06
*************** extern rtx adjust_address_1 PARAMS ((rtx
*** 636,642 ****
/* Return a memory reference like MEMREF, but whose address is changed by
adding OFFSET, an RTX, to it. POW2 is the highest power of two factor
known to be in OFFSET (possibly 1). */
! extern rtx offset_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
/* Return a memory reference like MEMREF, but with its address changed to
ADDR. The caller is asserting that the actual piece of memory pointed
--- 636,642 ----
/* Return a memory reference like MEMREF, but whose address is changed by
adding OFFSET, an RTX, to it. POW2 is the highest power of two factor
known to be in OFFSET (possibly 1). */
! extern rtx offset_address PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT));
/* Return a memory reference like MEMREF, but with its address changed to
ADDR. The caller is asserting that the actual piece of memory pointed