]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/ChangeLog
gas: Silence GCC 10 warning on tc-crx.c
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 13:46:26 +0000 (06:46 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 13:53:36 +0000 (06:53 -0700)
commite67e940f5d9102fb452b87aca441a2829a67d66b
tree20eb98b59087da5bc459895645e73d2a4e822a51
parent9e7cb4c359e6a86550bca296db617fb4c8068c1a
gas: Silence GCC 10 warning on tc-crx.c

opcode/crx.h has

typedef enum
  {
    ...
    MAX_REG
  }
reg;

typedef enum
  {
    c0 = MAX_REG,
  }
copreg;

tc-crx.c has

static int
getreg_image (reg r)
{
  ...
 /* Check whether the register is in registers table.  */
  if (r < MAX_REG)
    rreg = &crx_regtab[r];
  /* Check whether the register is in coprocessor registers table.  */
  else if (r < (int) MAX_COPREG)
    rreg = &crx_copregtab[r-MAX_REG];
}

Change getreg_image's argument type to int and replace fragP->fr_literal
with &fragP->fr_literal[0] to silence GCC 10 warning.

PR gas/26044
* config/tc-crx.c (getreg_image): Change argument type to int.
(md_convert_frag): Replace fragP->fr_literal with
&fragP->fr_literal[0].
gas/ChangeLog
gas/config/tc-crx.c