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 #1/5 - signed vs. unsigned.


I'm sending a series of 5 patches killing 723 warnings in total.

This patch fixes 37 `comparison between signed and unsigned' warnings
and removes some unused variables.

In dwarf2out.c (reg_save) I added a FIXME comment to highlight a
comparison of an unsigned variable with -1 in an if statement!

!   if (sreg == -1)	/* FIXME: How can this be -1? It is an unsigned!  */

Can someone who's more experienced with this particular code take a look?

gcc/ChangeLog:

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

	* c-decl (finish_struct): Change type of min_align to unsigned.

	* cplus-dem.c (demangle_function_name): Change type of variable i to size_t;
	remove unused variable len.

	* dwarf2out.c (reg_save): Add comment to expose comparison of unsigned
	variable sreg with -1.
	(reg_loc_descriptor): Remove redundant comparison of unsigned variable
	reg >= 0.
	(based_loc_descr): Likewise.

	* enquire.c (bitpattern): Change type of variable i to unsigned.

	* final.c (output_asm_insn): Don't cast insn_noperands to unsigned.

	* flow.c (life_analysis): Change type of variable i to size_t;
	remove unused variable insn.

	* gcc.c (translate_options): Change type of variables optlen, arglen and
	complen to size_t.
	(input_filename_length): Change type to size_t.
	(do_spec_1): Change type of variable bufsize to size_t.
	(main): Change type of variables i and j to size_t;
 	remove subblock local definition of variable i.
	(lookup_compiler): Change type of second argument to size_t;
	change type of variable i to size_t.

	* genemit.c (output_init_mov_optab): Change type of variable i to size_t.
	
	* genopinit.c (get_insn): Change type of variable pindex to size_t.

	* genrecog.c (add_to_sequence): Change type of variable i to size_t.

	* global.c (global_alloc): Change type of variable i to size_t.

	* regclass.c (init_reg_sets): Change type of variables i and j to unsigned.

	* stmt.c (expand_end_bindings): Change type of variable i to size_t.
	(expand_end_case): Change type of variable count to size_t.

	* toplev.c (main): Change type of variable j to size_t.
	(set_target_switch): Change type of variable j to size_t.
	(print_switch_values): Change type of variable j to size_t;
	remove unused variable flags.

	* varasm.c (assemble_variable): Change type of variable align to size_t.
	(const_hash_rtx): Change type of variable i to size_t.

gcc/cp/ChangeLog:

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

	* decl2.c (lang_decode_option): Change j's type to size_t.

	* tree.c (layout_vbasetypes): record_align and desired_align are of
	type unsigned int; const_size and nonvirtual_const_size likewise.

diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/c-decl.c egcs-980307/gcc/c-decl.c
*** egcs-980307.orig/gcc/c-decl.c	Thu Feb 19 18:26:06 1998
--- egcs-980307/gcc/c-decl.c	Sun Mar  8 14:31:47 1998
*************** finish_struct (t, fieldlist, attributes)
*** 5834,5840 ****
  	}
        else if (TREE_TYPE (x) != error_mark_node)
  	{
! 	  int min_align = (DECL_PACKED (x) ? BITS_PER_UNIT
  			   : TYPE_ALIGN (TREE_TYPE (x)));
  	  /* Non-bit-fields are aligned for their type, except packed
  	     fields which require only BITS_PER_UNIT alignment.  */
--- 5834,5840 ----
  	}
        else if (TREE_TYPE (x) != error_mark_node)
  	{
! 	  unsigned int min_align = (DECL_PACKED (x) ? BITS_PER_UNIT
  			   : TYPE_ALIGN (TREE_TYPE (x)));
  	  /* Non-bit-fields are aligned for their type, except packed
  	     fields which require only BITS_PER_UNIT alignment.  */
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/cp/decl2.c egcs-980307/gcc/cp/decl2.c
*** egcs-980307.orig/gcc/cp/decl2.c	Thu Mar  5 09:20:45 1998
--- egcs-980307/gcc/cp/decl2.c	Sun Mar  8 16:53:44 1998
*************** lang_decode_option (p)
*** 510,516 ****
        /* Some kind of -f option.
  	 P's value is the option sans `-f'.
  	 Search for it in the table of options.  */
!       int found = 0, j;
  
        p += 2;
        /* Try special -f options.  */
--- 510,517 ----
        /* Some kind of -f option.
  	 P's value is the option sans `-f'.
  	 Search for it in the table of options.  */
!       int found = 0;
!       size_t j;
  
        p += 2;
        /* Try special -f options.  */
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/cp/tree.c egcs-980307/gcc/cp/tree.c
*** egcs-980307.orig/gcc/cp/tree.c	Mon Feb 23 18:04:59 1998
--- egcs-980307/gcc/cp/tree.c	Sun Mar  8 15:54:11 1998
*************** layout_vbasetypes (rec, max)
*** 648,667 ****
    tree vbase_types = get_vbase_types (rec);
  
  #ifdef STRUCTURE_SIZE_BOUNDARY
!   unsigned record_align = MAX (STRUCTURE_SIZE_BOUNDARY, TYPE_ALIGN (rec));
  #else
!   unsigned record_align = MAX (BITS_PER_UNIT, TYPE_ALIGN (rec));
  #endif
!   int desired_align;
  
    /* Record size so far is CONST_SIZE + VAR_SIZE bits,
       where CONST_SIZE is an integer
       and VAR_SIZE is a tree expression.
       If VAR_SIZE is null, the size is just CONST_SIZE.
       Naturally we try to avoid using VAR_SIZE.  */
!   register unsigned const_size = 0;
    register tree var_size = 0;
!   int nonvirtual_const_size;
  
    CLASSTYPE_VBASECLASSES (rec) = vbase_types;
  
--- 648,667 ----
    tree vbase_types = get_vbase_types (rec);
  
  #ifdef STRUCTURE_SIZE_BOUNDARY
!   unsigned int record_align = MAX (STRUCTURE_SIZE_BOUNDARY, TYPE_ALIGN (rec));
  #else
!   unsigned int record_align = MAX (BITS_PER_UNIT, TYPE_ALIGN (rec));
  #endif
!   unsigned int desired_align;
  
    /* Record size so far is CONST_SIZE + VAR_SIZE bits,
       where CONST_SIZE is an integer
       and VAR_SIZE is a tree expression.
       If VAR_SIZE is null, the size is just CONST_SIZE.
       Naturally we try to avoid using VAR_SIZE.  */
!   register unsigned int const_size = 0;
    register tree var_size = 0;
!   unsigned int nonvirtual_const_size;
  
    CLASSTYPE_VBASECLASSES (rec) = vbase_types;
  
*************** layout_basetypes (rec, binfos)
*** 809,815 ****
  
    for (i = 0; i < n_baseclasses; i++)
      {
!       int inc, desired_align, int_vbase_size;
        register tree base_binfo = TREE_VEC_ELT (binfos, i);
        register tree basetype = BINFO_TYPE (base_binfo);
        tree decl, offset;
--- 809,816 ----
  
    for (i = 0; i < n_baseclasses; i++)
      {
!       int inc, int_vbase_size;
!       unsigned int desired_align;
        register tree base_binfo = TREE_VEC_ELT (binfos, i);
        register tree basetype = BINFO_TYPE (base_binfo);
        tree decl, offset;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/cplus-dem.c egcs-980307/gcc/cplus-dem.c
*** egcs-980307.orig/gcc/cplus-dem.c	Sat Feb  7 23:58:32 1998
--- egcs-980307/gcc/cplus-dem.c	Sun Mar  8 12:34:10 1998
*************** demangle_function_name (work, mangled, d
*** 2907,2914 ****
       string *declp;
       const char *scan;
  {
!   int i;
!   int len;
    string type;
    const char *tem;
  
--- 2906,2912 ----
       string *declp;
       const char *scan;
  {
!   size_t i;
    string type;
    const char *tem;
  
*************** demangle_function_name (work, mangled, d
*** 2955,2961 ****
  	{
  	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
  	    {
! 	      len = declp->p - declp->b - 10;
  	      if (strlen (optable[i].in) == len
  		  && memcmp (optable[i].in, declp->b + 10, len) == 0)
  		{
--- 2953,2959 ----
  	{
  	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
  	    {
! 	      int len = declp->p - declp->b - 10;
  	      if (strlen (optable[i].in) == len
  		  && memcmp (optable[i].in, declp->b + 10, len) == 0)
  		{
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/dwarf2out.c egcs-980307/gcc/dwarf2out.c
*** egcs-980307.orig/gcc/dwarf2out.c	Sat Feb 14 21:34:02 1998
--- egcs-980307/gcc/dwarf2out.c	Sun Mar  8 15:09:04 1998
*************** reg_save (label, reg, sreg, offset)
*** 917,923 ****
  
    cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg;
  
!   if (sreg == -1)
      {
        if (reg & ~0x3f)
  	/* The register number won't fit in 6 bits, so we have to use
--- 917,923 ----
  
    cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg;
  
!   if (sreg == -1)	/* FIXME: How can this be -1? It is an unsigned!  */
      {
        if (reg & ~0x3f)
  	/* The register number won't fit in 6 bits, so we have to use
*************** reg_loc_descriptor (rtl)
*** 6378,6384 ****
    register dw_loc_descr_ref loc_result = NULL;
    register unsigned reg = reg_number (rtl);
  
!   if (reg >= 0 && reg <= 31)
      loc_result = new_loc_descr (DW_OP_reg0 + reg, 0, 0);
    else
      loc_result = new_loc_descr (DW_OP_regx, reg, 0);
--- 6378,6384 ----
    register dw_loc_descr_ref loc_result = NULL;
    register unsigned reg = reg_number (rtl);
  
!   if (reg <= 31)
      loc_result = new_loc_descr (DW_OP_reg0 + reg, 0, 0);
    else
      loc_result = new_loc_descr (DW_OP_regx, reg, 0);
*************** based_loc_descr (reg, offset)
*** 6403,6409 ****
  
    if (reg == fp_reg)
      loc_result = new_loc_descr (DW_OP_fbreg, offset, 0);
!   else if (reg >= 0 && reg <= 31)
      loc_result = new_loc_descr (DW_OP_breg0 + reg, offset, 0);
    else
      loc_result = new_loc_descr (DW_OP_bregx, reg, offset);
--- 6403,6409 ----
  
    if (reg == fp_reg)
      loc_result = new_loc_descr (DW_OP_fbreg, offset, 0);
!   else if (reg <= 31)
      loc_result = new_loc_descr (DW_OP_breg0 + reg, offset, 0);
    else
      loc_result = new_loc_descr (DW_OP_bregx, reg, offset);
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/enquire.c egcs-980307/gcc/enquire.c
*** egcs-980307.orig/gcc/enquire.c	Sat Dec  6 18:19:49 1997
--- egcs-980307/gcc/enquire.c	Sun Mar  8 12:38:57 1998
*************** char *f_rep(precision, val) int precisio
*** 974,980 ****
  Procedure bitpattern(p, size) char *p; unsigned int size; {
  	/* Printf the bit-pattern of p */
  	char c;
! 	int i, j;
  
  	for (i=1; i<=size; i++) {
  		c= *p;
--- 974,981 ----
  Procedure bitpattern(p, size) char *p; unsigned int size; {
  	/* Printf the bit-pattern of p */
  	char c;
! 	unsigned int i;
! 	int j;
  
  	for (i=1; i<=size; i++) {
  		c= *p;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/final.c egcs-980307/gcc/final.c
*** egcs-980307.orig/gcc/final.c	Sat Mar  7 15:07:54 1998
--- egcs-980307/gcc/final.c	Sun Mar  8 15:23:32 1998
*************** output_asm_insn (template, operands)
*** 3244,3250 ****
  
  	    if (! (*p >= '0' && *p <= '9'))
  	      output_operand_lossage ("operand number missing after %-letter");
! 	    else if (this_is_asm_operands && c >= (unsigned) insn_noperands)
  	      output_operand_lossage ("operand number out of range");
  	    else if (letter == 'l')
  	      output_asm_label (operands[c]);
--- 3244,3250 ----
  
  	    if (! (*p >= '0' && *p <= '9'))
  	      output_operand_lossage ("operand number missing after %-letter");
! 	    else if (this_is_asm_operands && c >= insn_noperands)
  	      output_operand_lossage ("operand number out of range");
  	    else if (letter == 'l')
  	      output_asm_label (operands[c]);
*************** output_asm_insn (template, operands)
*** 3277,3283 ****
  	else if (*p >= '0' && *p <= '9')
  	  {
  	    c = atoi (p);
! 	    if (this_is_asm_operands && c >= (unsigned) insn_noperands)
  	      output_operand_lossage ("operand number out of range");
  	    else
  	      output_operand (operands[c], 0);
--- 3277,3283 ----
  	else if (*p >= '0' && *p <= '9')
  	  {
  	    c = atoi (p);
! 	    if (this_is_asm_operands && c >= insn_noperands)
  	      output_operand_lossage ("operand number out of range");
  	    else
  	      output_operand (operands[c], 0);
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
*************** life_analysis (f, nregs, file)
*** 957,964 ****
       int nregs;
       FILE *file;
  {
!   register rtx insn;
!   register int i;
  
  #ifdef ELIMINABLE_REGS
    static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
--- 957,963 ----
       int nregs;
       FILE *file;
  {
!   register size_t i;
  
  #ifdef ELIMINABLE_REGS
    static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/gcc.c egcs-980307/gcc/gcc.c
*** egcs-980307.orig/gcc/gcc.c	Sun Mar  1 16:10:04 1998
--- egcs-980307/gcc/gcc.c	Sun Mar  8 16:02:53 1998
*************** struct path_prefix;
*** 217,223 ****
  static void init_spec		PROTO((void));
  static void read_specs		PROTO((char *, int));
  static void set_spec		PROTO((char *, char *));
! static struct compiler *lookup_compiler PROTO((char *, int, char *));
  static char *build_search_list	PROTO((struct path_prefix *, char *, int));
  static void putenv_from_prefixes PROTO((struct path_prefix *, char *));
  static char *find_a_file	PROTO((struct path_prefix *, char *, int));
--- 217,223 ----
  static void init_spec		PROTO((void));
  static void read_specs		PROTO((char *, int));
  static void set_spec		PROTO((char *, char *));
! static struct compiler *lookup_compiler PROTO((char *, size_t, char *));
  static char *build_search_list	PROTO((struct path_prefix *, char *, int));
  static void putenv_from_prefixes PROTO((struct path_prefix *, char *));
  static char *find_a_file	PROTO((struct path_prefix *, char *, int));
*************** translate_options (argcp, argvp)
*** 861,869 ****
  	  /* Find a mapping that applies to this option.  */
  	  for (j = 0; j < sizeof (option_map) / sizeof (option_map[0]); j++)
  	    {
! 	      int optlen = strlen (option_map[j].name);
! 	      int arglen = strlen (argv[i]);
! 	      int complen = arglen > optlen ? optlen : arglen;
  	      char *arginfo = option_map[j].arg_info;
  
  	      if (arginfo == 0)
--- 865,873 ----
  	  /* Find a mapping that applies to this option.  */
  	  for (j = 0; j < sizeof (option_map) / sizeof (option_map[0]); j++)
  	    {
! 	      size_t optlen = strlen (option_map[j].name);
! 	      size_t arglen = strlen (argv[i]);
! 	      size_t complen = arglen > optlen ? optlen : arglen;
  	      char *arginfo = option_map[j].arg_info;
  
  	      if (arginfo == 0)
*************** process_command (argc, argv)
*** 3014,3020 ****
  
  static char *input_filename;
  static int input_file_number;
! static int input_filename_length;
  static int basename_length;
  static char *input_basename;
  static char *input_suffix;
--- 3020,3026 ----
  
  static char *input_filename;
  static int input_file_number;
! static size_t input_filename_length;
  static int basename_length;
  static char *input_basename;
  static char *input_suffix;
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 3210,3216 ****
  	  case 'D':
  	    {
  	      struct prefix_list *pl = startfile_prefixes.plist;
! 	      int bufsize = 100;
  	      char *buffer = (char *) xmalloc (bufsize);
  	      int idx;
  
--- 3216,3222 ----
  	  case 'D':
  	    {
  	      struct prefix_list *pl = startfile_prefixes.plist;
! 	      size_t bufsize = 100;
  	      char *buffer = (char *) xmalloc (bufsize);
  	      int idx;
  
*************** main (argc, argv)
*** 4299,4306 ****
       int argc;
       char **argv;
  {
!   register int i;
!   int j;
    int value;
    int linker_was_run = 0;
    char *explicit_link_files;
--- 4305,4312 ----
       int argc;
       char **argv;
  {
!   register size_t i;
!   size_t j;
    int value;
    int linker_was_run = 0;
    char *explicit_link_files;
*************** main (argc, argv)
*** 4392,4398 ****
    process_command (argc, argv);
  
    {
-     int i;
      int first_time;
  
      /* Build COLLECT_GCC_OPTIONS to have all of the options specified to
--- 4398,4403 ----
*************** main (argc, argv)
*** 4778,4784 ****
  static struct compiler *
  lookup_compiler (name, length, language)
       char *name;
!      int length;
       char *language;
  {
    struct compiler *cp;
--- 4783,4789 ----
  static struct compiler *
  lookup_compiler (name, length, language)
       char *name;
!      size_t length;
       char *language;
  {
    struct compiler *cp;
*************** validate_all_switches ()
*** 5045,5051 ****
  
    for (comp = compilers; comp->spec[0]; comp++)
      {
!       int i;
        for (i = 0; i < sizeof comp->spec / sizeof comp->spec[0] && comp->spec[i]; i++)
  	{
  	  p = comp->spec[i];
--- 5050,5056 ----
  
    for (comp = compilers; comp->spec[0]; comp++)
      {
!       size_t i;
        for (i = 0; i < sizeof comp->spec / sizeof comp->spec[0] && comp->spec[i]; i++)
  	{
  	  p = comp->spec[i];
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/genemit.c egcs-980307/gcc/genemit.c
*** egcs-980307.orig/gcc/genemit.c	Sun Mar  1 16:10:09 1998
--- egcs-980307/gcc/genemit.c	Sun Mar  8 15:29:41 1998
*************** output_init_mov_optab ()
*** 650,656 ****
  #ifdef EXTRA_CC_NAMES
    static char *cc_names[] = { EXTRA_CC_NAMES };
    char *p;
!   int i;
  
    printf ("\nvoid\ninit_mov_optab ()\n{\n");
  
--- 650,656 ----
  #ifdef EXTRA_CC_NAMES
    static char *cc_names[] = { EXTRA_CC_NAMES };
    char *p;
!   size_t i;
  
    printf ("\nvoid\ninit_mov_optab ()\n{\n");
  
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/genopinit.c egcs-980307/gcc/genopinit.c
*** egcs-980307.orig/gcc/genopinit.c	Sun Mar  1 16:10:12 1998
--- egcs-980307/gcc/genopinit.c	Sun Mar  8 15:27:01 1998
*************** gen_insn (insn)
*** 141,147 ****
  {
    char *name = XSTR (insn, 0);
    int m1, m2, op;
!   int pindex;
    int i;
    char *np, *pp, *p, *q;
  
--- 141,147 ----
  {
    char *name = XSTR (insn, 0);
    int m1, m2, op;
!   size_t pindex;
    int i;
    char *np, *pp, *p, *q;
  
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/genrecog.c egcs-980307/gcc/genrecog.c
*** egcs-980307.orig/gcc/genrecog.c	Sun Mar  1 16:10:15 1998
--- egcs-980307/gcc/genrecog.c	Sun Mar  8 15:27:30 1998
*************** add_to_sequence (pattern, last, position
*** 306,312 ****
    struct decision *this;
    char *newpos;
    register char *fmt;
!   register int i;
    int depth = strlen (position);
    int len;
  
--- 306,312 ----
    struct decision *this;
    char *newpos;
    register char *fmt;
!   register size_t i;
    int depth = strlen (position);
    int len;
  
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/global.c egcs-980307/gcc/global.c
*** egcs-980307.orig/gcc/global.c	Sat Feb  7 23:54:31 1998
--- egcs-980307/gcc/global.c	Sun Mar  8 15:18:03 1998
*************** global_alloc (file)
*** 293,299 ****
  #endif
         || FRAME_POINTER_REQUIRED);
  
!   register int i;
    rtx x;
  
    max_allocno = 0;
--- 293,299 ----
  #endif
         || FRAME_POINTER_REQUIRED);
  
!   register size_t i;
    rtx x;
  
    max_allocno = 0;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/regclass.c egcs-980307/gcc/regclass.c
*** egcs-980307.orig/gcc/regclass.c	Sun Mar  1 16:10:26 1998
--- egcs-980307/gcc/regclass.c	Sun Mar  8 15:17:21 1998
*************** init_reg_sets ()
*** 328,334 ****
  static void
  init_reg_sets_1 ()
  {
!   register int i, j;
  
    /* This macro allows the fixed or call-used registers
       to depend on target flags.  */
--- 328,334 ----
  static void
  init_reg_sets_1 ()
  {
!   register unsigned int i, j;
  
    /* This macro allows the fixed or call-used registers
       to depend on target flags.  */
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/stmt.c egcs-980307/gcc/stmt.c
*** egcs-980307.orig/gcc/stmt.c	Sat Mar  7 15:07:58 1998
--- egcs-980307/gcc/stmt.c	Sun Mar  8 14:44:58 1998
*************** expand_end_bindings (vars, mark_ends, do
*** 2916,2922 ****
  	     This is the case on all known machines; if we don't make this
  	     assumption, we do unnecessary saving on many machines.  */
  	  static struct elims {int from, to;} elim_regs[] = ELIMINABLE_REGS;
! 	  int i;
  
  	  for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
  	    if (elim_regs[i].from == ARG_POINTER_REGNUM
--- 2916,2922 ----
  	     This is the case on all known machines; if we don't make this
  	     assumption, we do unnecessary saving on many machines.  */
  	  static struct elims {int from, to;} elim_regs[] = ELIMINABLE_REGS;
! 	  size_t i;
  
  	  for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
  	    if (elim_regs[i].from == ARG_POINTER_REGNUM
*************** expand_end_case (orig_index)
*** 4594,4600 ****
    tree minval, maxval, range, orig_minval;
    rtx default_label = 0;
    register struct case_node *n;
!   int count;
    rtx index;
    rtx table_label;
    int ncases;
--- 4594,4600 ----
    tree minval, maxval, range, orig_minval;
    rtx default_label = 0;
    register struct case_node *n;
!   unsigned int count;
    rtx index;
    rtx table_label;
    int ncases;
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/toplev.c egcs-980307/gcc/toplev.c
*** egcs-980307.orig/gcc/toplev.c	Fri Mar  6 17:13:31 1998
--- egcs-980307/gcc/toplev.c	Sun Mar  8 14:37:04 1998
*************** main (argc, argv, envp)
*** 3819,3825 ****
  
    for (i = 1; i < argc; i++)
      {
!       int j;
        /* If this is a language-specific option,
  	 decode it in a language-specific way.  */
        for (j = 0; lang_options[j] != 0; j++)
--- 3819,3825 ----
  
    for (i = 1; i < argc; i++)
      {
!       size_t j;
        /* If this is a language-specific option,
  	 decode it in a language-specific way.  */
        for (j = 0; lang_options[j] != 0; j++)
*************** void
*** 4411,4417 ****
  set_target_switch (name)
       char *name;
  {
!   register int j;
    int valid = 0;
  
    for (j = 0; j < sizeof target_switches / sizeof target_switches[0]; j++)
--- 4411,4417 ----
  set_target_switch (name)
       char *name;
  {
!   register size_t j;
    int valid = 0;
  
    for (j = 0; j < sizeof target_switches / sizeof target_switches[0]; j++)
*************** print_switch_values (file, pos, max, ind
*** 4504,4510 ****
       int pos, max;
       char *indent, *sep, *term;
  {
!   int j, flags;
    char **p;
  
    /* Print the options as passed.  */
--- 4504,4510 ----
       int pos, max;
       char *indent, *sep, *term;
  {
!   size_t j;
    char **p;
  
    /* Print the options as passed.  */
*************** print_switch_values (file, pos, max, ind
*** 4548,4554 ****
  
    /* Print target specific options.  */
  
-   flags = target_flags;
    for (j = 0; j < sizeof target_switches / sizeof target_switches[0]; j++)
      if (target_switches[j].name[0] != '\0'
  	&& target_switches[j].value > 0
--- 4548,4553 ----
*************** print_switch_values (file, pos, max, ind
*** 4557,4563 ****
        {
  	pos = print_single_switch (file, pos, max, indent, sep, term,
  				   "-m", target_switches[j].name);
- 	flags &= ~ target_switches[j].value;
        }
  
  #ifdef TARGET_OPTIONS
--- 4556,4561 ----
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/varasm.c egcs-980307/gcc/varasm.c
*** egcs-980307.orig/gcc/varasm.c	Sun Mar  1 16:10:39 1998
--- egcs-980307/gcc/varasm.c	Sun Mar  8 14:57:25 1998
*************** assemble_variable (decl, top_level, at_e
*** 1142,1148 ****
       int dont_output_data;
  {
    register char *name;
!   int align;
    tree size_tree;
    int reloc = 0;
    enum in_section saved_in_section;
--- 1142,1148 ----
       int dont_output_data;
  {
    register char *name;
!   unsigned int align;
    tree size_tree;
    int reloc = 0;
    enum in_section saved_in_section;
*************** const_hash_rtx (mode, x)
*** 3216,3222 ****
       enum machine_mode mode;
       rtx x;
  {
!   register int hi, i;
  
    struct rtx_const value;
    decode_rtx_const (mode, x, &value);
--- 3218,3225 ----
       enum machine_mode mode;
       rtx x;
  {
!   register int hi;
!   register size_t i;
  
    struct rtx_const value;
    decode_rtx_const (mode, x, &value);


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