]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-decl (finish_struct): Change type of min_align to unsigned.
authorManfred Hollstein <manfred@s-direktnet.de>
Thu, 12 Mar 1998 00:02:51 +0000 (00:02 +0000)
committerManfred Hollstein <manfred@gcc.gnu.org>
Thu, 12 Mar 1998 00:02:51 +0000 (00:02 +0000)
d
gcc/ChangeLog:
* 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 explicit cast of -1 to unsigned and a
comment indicating this is proper behaviour.
(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.

From-SVN: r18490

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/dwarf2out.c
gcc/final.c
gcc/flow.c
gcc/gcc.c
gcc/genemit.c
gcc/genrecog.c
gcc/stmt.c
gcc/toplev.c

index 3c87446dacab90d7d680e0b62f0fdde049371ce6..2daa654ae2e062fae669d9d4fdaa1dcf71f43e11 100644 (file)
@@ -1,3 +1,53 @@
+Thu Mar 12 08:37: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 explicit cast of -1 to unsigned and a
+       comment indicating this is proper behaviour.
+       (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.
+
 1998-03-11  Mark Mitchell  <mmitchell@usa.net>
 
        * dbxout.c (dbxout_type_methods): Only treat TYPE_METHODS as a
index 6e1c4ef23307c5d255a271ab0810eff6ec6c56b1..4538a80872a508e81ddefdfeb5c0d6ee913e2c91 100644 (file)
@@ -1,3 +1,10 @@
+Thu Mar 12 08:39:13 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.
+
 Wed Mar 11 07:31:08 1998  Mark Mitchell  <mmitchell@usa.net>
 
        * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
index 2d8ecb96469b6c90bbb6beb5258d022af9255c14..adf0fc6bac77a89642b677ce36703f8104b5b9e5 100644 (file)
@@ -510,7 +510,8 @@ lang_decode_option (p)
       /* 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;
+      int found = 0;
+      size_t j;
 
       p += 2;
       /* Try special -f options.  */
index a1462354379b1f223f83b545955732b470addd09..0911e7dbeba7955ec4ad05b138f65dca2689e056 100644 (file)
@@ -917,7 +917,9 @@ reg_save (label, reg, sreg, offset)
 
   cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg;
 
-  if (sreg == -1)
+  /* The following comparison is correct. -1 is used to indicate that
+     the value isn't a register number.  */
+  if (sreg == (unsigned int) -1)
     {
       if (reg & ~0x3f)
        /* The register number won't fit in 6 bits, so we have to use
@@ -6378,7 +6380,7 @@ reg_loc_descriptor (rtl)
   register dw_loc_descr_ref loc_result = NULL;
   register unsigned reg = reg_number (rtl);
 
-  if (reg >= 0 && reg <= 31)
+  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);
@@ -6403,7 +6405,7 @@ based_loc_descr (reg, offset)
 
   if (reg == fp_reg)
     loc_result = new_loc_descr (DW_OP_fbreg, offset, 0);
-  else if (reg >= 0 && reg <= 31)
+  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);
index b1a870708b72b7e1ae02435708718fa2fe456361..151697d05d40efc04f55983b31211610f71a532d 100644 (file)
@@ -3244,7 +3244,7 @@ output_asm_insn (template, operands)
 
            if (! (*p >= '0' && *p <= '9'))
              output_operand_lossage ("operand number missing after %-letter");
-           else if (this_is_asm_operands && c >= (unsigned) insn_noperands)
+           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]);
@@ -3277,7 +3277,7 @@ output_asm_insn (template, operands)
        else if (*p >= '0' && *p <= '9')
          {
            c = atoi (p);
-           if (this_is_asm_operands && c >= (unsigned) insn_noperands)
+           if (this_is_asm_operands && c >= insn_noperands)
              output_operand_lossage ("operand number out of range");
            else
              output_operand (operands[c], 0);
index 0bca7ac0999927a70b19a13a0465a465d5dce84a..c739607a84c4c352dc1985249e7c34c63d4bfb29 100644 (file)
@@ -965,8 +965,7 @@ life_analysis (f, nregs, file)
      int nregs;
      FILE *file;
 {
-  register rtx insn;
-  register int i;
+  register size_t i;
 
 #ifdef ELIMINABLE_REGS
   static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
index 5f53c246690508008ea4a78bf0bbd24bc74d8cc0..5d2855d9ec754335ec2fc6919b153a0205f28a8c 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -217,7 +217,7 @@ struct path_prefix;
 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 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));
@@ -861,9 +861,9 @@ translate_options (argcp, argvp)
          /* 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;
+             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)
@@ -3014,7 +3014,7 @@ process_command (argc, argv)
 
 static char *input_filename;
 static int input_file_number;
-static int input_filename_length;
+static size_t input_filename_length;
 static int basename_length;
 static char *input_basename;
 static char *input_suffix;
@@ -3210,7 +3210,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
          case 'D':
            {
              struct prefix_list *pl = startfile_prefixes.plist;
-             int bufsize = 100;
+             size_t bufsize = 100;
              char *buffer = (char *) xmalloc (bufsize);
              int idx;
 
@@ -4299,8 +4299,8 @@ main (argc, argv)
      int argc;
      char **argv;
 {
-  register int i;
-  int j;
+  register size_t i;
+  size_t j;
   int value;
   int linker_was_run = 0;
   char *explicit_link_files;
@@ -4392,7 +4392,6 @@ main (argc, argv)
   process_command (argc, argv);
 
   {
-    int i;
     int first_time;
 
     /* Build COLLECT_GCC_OPTIONS to have all of the options specified to
@@ -4778,7 +4777,7 @@ main (argc, argv)
 static struct compiler *
 lookup_compiler (name, length, language)
      char *name;
-     int length;
+     size_t length;
      char *language;
 {
   struct compiler *cp;
@@ -5045,7 +5044,7 @@ validate_all_switches ()
 
   for (comp = compilers; comp->spec[0]; comp++)
     {
-      int i;
+      size_t i;
       for (i = 0; i < sizeof comp->spec / sizeof comp->spec[0] && comp->spec[i]; i++)
        {
          p = comp->spec[i];
index 08023f48a563f5bfba74df7856e3e2ea7565f542..dc5eca1502b8d216a988b4513e044a3d02b06b3b 100644 (file)
@@ -650,7 +650,7 @@ output_init_mov_optab ()
 #ifdef EXTRA_CC_NAMES
   static char *cc_names[] = { EXTRA_CC_NAMES };
   char *p;
-  int i;
+  size_t i;
 
   printf ("\nvoid\ninit_mov_optab ()\n{\n");
 
index d9c8a5d459360e615598742a806c0ea88a662a67..6e9877bf1cc5491deaf6f975772e1f25f32ee171 100644 (file)
@@ -306,7 +306,7 @@ add_to_sequence (pattern, last, position)
   struct decision *this;
   char *newpos;
   register char *fmt;
-  register int i;
+  register size_t i;
   int depth = strlen (position);
   int len;
 
index 8d5d73ec7e838eb6300d08670774738a7e32a704..6b370ba275662e219734815cc50bd6607f35f361 100644 (file)
@@ -2916,7 +2916,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
             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;
+         size_t i;
 
          for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
            if (elim_regs[i].from == ARG_POINTER_REGNUM
@@ -4594,7 +4594,7 @@ expand_end_case (orig_index)
   tree minval, maxval, range, orig_minval;
   rtx default_label = 0;
   register struct case_node *n;
-  int count;
+  unsigned int count;
   rtx index;
   rtx table_label;
   int ncases;
index 1922384881eb40c5d84fee0e1789fbf69ce62c26..70dddc24bd336eb9d3af8f54a8f63e573d294f67 100644 (file)
@@ -3819,7 +3819,7 @@ main (argc, argv, envp)
 
   for (i = 1; i < argc; i++)
     {
-      int j;
+      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++)
@@ -4411,7 +4411,7 @@ void
 set_target_switch (name)
      char *name;
 {
-  register int j;
+  register size_t j;
   int valid = 0;
 
   for (j = 0; j < sizeof target_switches / sizeof target_switches[0]; j++)
@@ -4504,7 +4504,7 @@ print_switch_values (file, pos, max, indent, sep, term)
      int pos, max;
      char *indent, *sep, *term;
 {
-  int j, flags;
+  size_t j;
   char **p;
 
   /* Print the options as passed.  */
@@ -4548,7 +4548,6 @@ print_switch_values (file, pos, max, indent, sep, term)
 
   /* 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
@@ -4557,7 +4556,6 @@ print_switch_values (file, pos, max, indent, sep, term)
       {
        pos = print_single_switch (file, pos, max, indent, sep, term,
                                   "-m", target_switches[j].name);
-       flags &= ~ target_switches[j].value;
       }
 
 #ifdef TARGET_OPTIONS