Also change global variable pta_size to unsigned.
2021-01-14 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/98671
* config/i386/i386-options.c (ix86_valid_target_attribute_inner_p):
Remove declaration and initialization of shadow variable "ret".
(ix86_option_override_internal): Remove delcaration of
shadow variable "i". Redeclare shadowed variable to unsigned.
* common/config/i386/i386-common.c (pta_size): Redeclare to unsigned.
* config/i386/i386-builtins.c (get_builtin_code_for_version):
Update for redeclaration.
* config/i386/i386.h (pta_size): Ditto.
};
/* NB: processor_alias_table stops at the "generic" entry. */
-int const pta_size = ARRAY_SIZE (processor_alias_table) - 6;
+unsigned int const pta_size = ARRAY_SIZE (processor_alias_table) - 6;
unsigned int const num_arch_names = ARRAY_SIZE (processor_alias_table);
/* Provide valid option values for -march and -mtune options. */
gcc_assert (new_target);
if (new_target->arch_specified && new_target->arch > 0)
- for (i = 0; i < (unsigned int) pta_size; i++)
+ for (i = 0; i < pta_size; i++)
if (processor_alias_table[i].processor == new_target->arch)
{
const pta *arch_info = &processor_alias_table[i];
/* If this is a list, recurse to get the options. */
if (TREE_CODE (args) == TREE_LIST)
{
- bool ret = true;
-
for (; args; args = TREE_CHAIN (args))
if (TREE_VALUE (args)
&& !ix86_valid_target_attribute_inner_p (fndecl, TREE_VALUE (args),
struct gcc_options *opts,
struct gcc_options *opts_set)
{
- int i;
+ unsigned int i;
unsigned HOST_WIDE_INT ix86_arch_mask;
const bool ix86_tune_specified = (opts->x_ix86_tune_string != NULL);
{
char *p = ASTRDUP (opts->x_ix86_recip_name);
char *q;
- unsigned int mask, i;
+ unsigned int mask;
bool invert;
while ((q = strtok (p, ",")) != NULL)
};
extern const pta processor_alias_table[];
-extern int const pta_size;
+extern unsigned int const pta_size;
extern unsigned int const num_arch_names;
#endif