+Mon May 24 13:36:55 1999 Doug Evans <devans@canuck.cygnus.com>
+
+ -Wchar-subscripts cleanup
+ * listing.c (listing_newline): Use unsigned char variable, so
+ calls to isascii,iscntrl are correct.
+ * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with
+ (unsigned char).
+ * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto.
+ * config/obj-elf.c (obj_elf_vtable_inherit): Ditto.
+ * config/tc-mips.c (mips_ip,mips16_ip): Ditto.
+ (my_getSmallExpression,get_number,s_mips_ent): Ditto.
+
1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
* config/tc-m68k.c (m68k_ip): Check for disallowed index register
/* If the instruction contains a '.', we first try to match an instruction
including the '.'. Then we try again without the '.'. */
insn = NULL;
- for (s = str; *s != '\0' && !isspace(*s); ++s)
+ for (s = str; *s != '\0' && !isspace ((unsigned char) *s); ++s)
continue;
/* If we stopped on whitespace, then replace the whitespace with null for
the call to hash_find. Save the character we replaced just in case we
have to re-parse the instruction. */
- if (isspace (*s))
+ if (isspace ((unsigned char) *s))
{
save_c = *s;
*s++ = '\0';
*(--s) = save_c;
/* Scan up to the first '.' or whitespace. */
- for (s = str; *s != '\0' && *s != '.' && !isspace (*s); ++s)
+ for (s = str; *s != '\0' && *s != '.' && !isspace ((unsigned char) *s); ++s)
continue;
/* If we did not find a '.', then we can quit now. */
if (s[0] == '$')
{
- if (isdigit (s[1]))
+ if (isdigit ((unsigned char) s[1]))
{
++s;
regno = 0;
regno += *s - '0';
++s;
}
- while (isdigit (*s));
+ while (isdigit ((unsigned char) *s));
if (regno > 31)
as_bad (_("Invalid register number (%d)"), regno);
}
case 'V':
case 'W':
s_reset = s;
- if (s[0] == '$' && s[1] == 'f' && isdigit (s[2]))
+ if (s[0] == '$' && s[1] == 'f' && isdigit ((unsigned char) s[2]))
{
s += 2;
regno = 0;
regno += *s - '0';
++s;
}
- while (isdigit (*s));
+ while (isdigit ((unsigned char) *s));
if (regno > 31)
as_bad (_("Invalid float register number (%d)"), regno);
regno += *s - '0';
++s;
}
- while (isdigit (*s));
+ while (isdigit ((unsigned char) *s));
if (regno > 7)
as_bad (_("invalid condition code register $fcc%d"), regno);
if (*args == 'N')
mips16_small = false;
mips16_ext = false;
- for (s = str; islower (*s); ++s)
+ for (s = str; islower ((unsigned char) *s); ++s)
;
switch (*s)
{
if (s[0] != '$')
break;
s_reset = s;
- if (isdigit (s[1]))
+ if (isdigit ((unsigned char) s[1]))
{
++s;
regno = 0;
regno += *s - '0';
++s;
}
- while (isdigit (*s));
+ while (isdigit ((unsigned char) *s));
if (regno > 31)
{
as_bad (_("invalid register number (%d)"), regno);
++s;
}
reg1 = 0;
- while (isdigit (*s))
+ while (isdigit ((unsigned char) *s))
{
reg1 *= 10;
reg1 += *s - '0';
}
}
reg2 = 0;
- while (isdigit (*s))
+ while (isdigit ((unsigned char) *s))
{
reg2 *= 10;
reg2 += *s - '0';
;
if (sp - 4 >= str && sp[-1] == RP)
{
- if (isdigit (sp[-2]))
+ if (isdigit ((unsigned char) sp[-2]))
{
- for (sp -= 3; sp >= str && isdigit (*sp); sp--)
+ for (sp -= 3; sp >= str && isdigit ((unsigned char) *sp); sp--)
;
if (*sp == '$' && sp > str && sp[-1] == LP)
{
++input_line_pointer;
negative = 1;
}
- if (!isdigit (*input_line_pointer))
+ if (!isdigit ((unsigned char) *input_line_pointer))
as_bad (_("Expected simple number."));
if (input_line_pointer[0] == '0')
{
if (input_line_pointer[1] == 'x')
{
input_line_pointer += 2;
- while (isxdigit (*input_line_pointer))
+ while (isxdigit ((unsigned char) *input_line_pointer))
{
val <<= 4;
val |= hex_value (*input_line_pointer++);
else
{
++input_line_pointer;
- while (isdigit (*input_line_pointer))
+ while (isdigit ((unsigned char) *input_line_pointer))
{
val <<= 3;
val |= *input_line_pointer++ - '0';
return negative ? -val : val;
}
}
- if (!isdigit (*input_line_pointer))
+ if (!isdigit ((unsigned char) *input_line_pointer))
{
printf (_(" *input_line_pointer == '%c' 0x%02x\n"),
*input_line_pointer, *input_line_pointer);
as_warn (_("Invalid number"));
return -1;
}
- while (isdigit (*input_line_pointer))
+ while (isdigit ((unsigned char) *input_line_pointer))
{
val *= 10;
val += *input_line_pointer++ - '0';
if (*input_line_pointer == ',')
input_line_pointer++;
SKIP_WHITESPACE ();
- if (isdigit (*input_line_pointer) || *input_line_pointer == '-')
+ if (isdigit ((unsigned char) *input_line_pointer)
+ || *input_line_pointer == '-')
number = get_number ();
#ifdef BFD_ASSEMBLER