]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Arm64: fix build for certain gcc versions
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Dec 2023 11:04:08 +0000 (12:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Dec 2023 11:04:08 +0000 (12:04 +0100)
Some complain (by default) about isalpha shadowing ctype.h's isalpha().
Some also complain about signed/unsigned comparison a few lines later.

gas/config/tc-aarch64.c

index 5646de781d4502c0aa434368f0603c11ee456966..4a2892d992cf13d74adf0fc876a10180b4923f2c 100644 (file)
@@ -1191,7 +1191,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type,
                 struct vector_type_el *typeinfo, unsigned int flags)
 {
   char *str = *ccp;
-  bool isalpha = ISALPHA (*str);
+  bool is_alpha = ISALPHA (*str);
   const reg_entry *reg = parse_reg (&str);
   struct vector_type_el atype;
   struct vector_type_el parsetype;
@@ -1208,7 +1208,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type,
     {
       if (typeinfo)
        *typeinfo = atype;
-      if (!isalpha && (flags & PTR_IN_REGLIST))
+      if (!is_alpha && (flags & PTR_IN_REGLIST))
        set_fatal_syntax_error (_("syntax error in register list"));
       else if (flags & PTR_GOOD_MATCH)
        set_fatal_syntax_error (NULL);
@@ -1237,7 +1237,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type,
          if ((reg->type == REG_TYPE_ZAT
               || reg->type == REG_TYPE_ZATH
               || reg->type == REG_TYPE_ZATV)
-             && reg->number * 8 >= parsetype.element_size)
+             && reg->number * 8U >= parsetype.element_size)
            {
              set_syntax_error (_("ZA tile number out of range"));
              return NULL;