This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[980307]: Warning patches #5/5 - the rest...


This patch corrects:

  1. function `compute_preds_succs' actually doesn't return anything,
     although declared as int
  2. casts a char value used as an array index explicitly to int

gcc/ChangeLog:

Sun Mar  8 17:06:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* basic-block.h (compute_preds_succs): Change return type in
	prototype to void.
	* flow.c (compute_preds_succs): Likewise in function definition.

	* regmove.c (find_matches): Explicitly cast char used as array index to int.

diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/basic-block.h egcs-980307/gcc/basic-block.h
*** egcs-980307.orig/gcc/basic-block.h	Sat Mar  7 15:07:51 1998
--- egcs-980307/gcc/basic-block.h	Sun Mar  8 15:14:20 1998
*************** extern void free_int_list               
*** 182,189 ****
  extern int *uid_block_number;
  #define BLOCK_NUM(INSN)    uid_block_number[INSN_UID (INSN)]
  
! extern int compute_preds_succs PROTO ((int_list_ptr *, int_list_ptr *,
! 				       int *, int *));
  extern void dump_bb_data       PROTO ((FILE *, int_list_ptr *, int_list_ptr *));
  extern void free_bb_mem        PROTO ((void));
  extern void free_basic_block_vars	PROTO ((int));
--- 182,189 ----
  extern int *uid_block_number;
  #define BLOCK_NUM(INSN)    uid_block_number[INSN_UID (INSN)]
  
! extern void compute_preds_succs PROTO ((int_list_ptr *, int_list_ptr *,
! 				        int *, int *));
  extern void dump_bb_data       PROTO ((FILE *, int_list_ptr *, int_list_ptr *));
  extern void free_bb_mem        PROTO ((void));
  extern void free_basic_block_vars	PROTO ((int));
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/flow.c egcs-980307/gcc/flow.c
*** egcs-980307.orig/gcc/flow.c	Fri Mar  6 17:13:26 1998
--- egcs-980307/gcc/flow.c	Sun Mar  8 15:14:25 1998
*************** add_pred_succ (pred_bb, succ_bb, s_preds
*** 3239,3245 ****
  }
  
  /* Compute the predecessors and successors for each block.  */
! int
  compute_preds_succs (s_preds, s_succs, num_preds, num_succs)
       int_list_ptr *s_preds;
       int_list_ptr *s_succs;
--- 3238,3244 ----
  }
  
  /* Compute the predecessors and successors for each block.  */
! void
  compute_preds_succs (s_preds, s_succs, num_preds, num_succs)
       int_list_ptr *s_preds;
       int_list_ptr *s_succs;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/regmove.c egcs-980307/gcc/regmove.c
*** egcs-980307.orig/gcc/regmove.c	Sun Mar  1 16:10:27 1998
--- egcs-980307/gcc/regmove.c	Sun Mar  8 15:05:08 1998
*************** find_matches (insn, matchp)
*** 1202,1208 ****
  	  case '0': case '1': case '2': case '3': case '4':
  	  case '5': case '6': case '7': case '8': case '9':
  	    c -= '0';
! 	    if (c < operand_number && likely_spilled[c])
  	      break;
  	    matchp->with[operand_number] = c;
  	    any_matches = 1;
--- 1202,1208 ----
  	  case '0': case '1': case '2': case '3': case '4':
  	  case '5': case '6': case '7': case '8': case '9':
  	    c -= '0';
! 	    if (c < operand_number && likely_spilled[(int) (unsigned char) c])
  	      break;
  	    matchp->with[operand_number] = c;
  	    any_matches = 1;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]