diff options
author | Manfred Hollstein <manfred@s-direktnet.de> | 1998-03-12 00:02:51 +0000 |
---|---|---|
committer | Manfred Hollstein <manfred@gcc.gnu.org> | 1998-03-12 00:02:51 +0000 |
commit | 8506650392e4e0269e576c6331da763d79196e34 (patch) | |
tree | c0b0ead5f1ce5f7f4353a9bf27608bce69b66548 /gcc | |
parent | 5ae9a7e94aa1c9abd7b61bb4df579bedecec749c (diff) | |
download | gcc-8506650392e4e0269e576c6331da763d79196e34.zip gcc-8506650392e4e0269e576c6331da763d79196e34.tar.gz gcc-8506650392e4e0269e576c6331da763d79196e34.tar.bz2 |
c-decl (finish_struct): Change type of min_align to unsigned.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 50 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 3 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 8 | ||||
-rw-r--r-- | gcc/final.c | 4 | ||||
-rw-r--r-- | gcc/flow.c | 3 | ||||
-rw-r--r-- | gcc/gcc.c | 21 | ||||
-rw-r--r-- | gcc/genemit.c | 2 | ||||
-rw-r--r-- | gcc/genrecog.c | 2 | ||||
-rw-r--r-- | gcc/stmt.c | 4 | ||||
-rw-r--r-- | gcc/toplev.c | 8 |
11 files changed, 84 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c87446..2daa654 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6e1c4ef..4538a80 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 2d8ecb9..adf0fc6 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a146235..0911e7d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); diff --git a/gcc/final.c b/gcc/final.c index b1a8707..151697d 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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); @@ -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; @@ -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]; diff --git a/gcc/genemit.c b/gcc/genemit.c index 08023f4..dc5eca1 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -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"); diff --git a/gcc/genrecog.c b/gcc/genrecog.c index d9c8a5d..6e9877b 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -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; @@ -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; diff --git a/gcc/toplev.c b/gcc/toplev.c index 1922384..70dddc2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 |