aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-26 07:41:07 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-26 07:41:07 -0700
commitc4612b92e38e9495970afc703f222f99d27c1b4d (patch)
tree2d318e9b8ed3bb502991d7fa58b5da1b0670d3fa
parent70b1b570bfba0c97b37870747eb4bc0ae665cf66 (diff)
downloadgdb-c4612b92e38e9495970afc703f222f99d27c1b4d.zip
gdb-c4612b92e38e9495970afc703f222f99d27c1b4d.tar.gz
gdb-c4612b92e38e9495970afc703f222f99d27c1b4d.tar.bz2
gas: Silence GCC 10 warning tc-vax.c
PR gas/26044 * config/tc-vax.c (md_estimate_size_before_relax): Replace fragP->fr_literal with &fragP->fr_literal[0]. (md_convert_frag): Likewise.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-vax.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 052d180..980a84f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,6 +1,13 @@
2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
PR gas/26044
+ * config/tc-vax.c (md_estimate_size_before_relax): Replace
+ fragP->fr_literal with &fragP->fr_literal[0].
+ (md_convert_frag): Likewise.
+
+2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/26044
* config/tc-v850.c (md_convert_frag): Replace fragP->fr_literal
with &fragP->fr_literal[0].
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index 5634566..f606c15 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -381,7 +381,7 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
int old_fr_fix;
old_fr_fix = fragP->fr_fix;
- p = fragP->fr_literal + old_fr_fix;
+ p = &fragP->fr_literal[0] + old_fr_fix;
#ifdef OBJ_ELF
/* If this is to an undefined symbol, then if it's an indirect
reference indicate that is can mutated into a GLOB_DAT or
@@ -525,7 +525,7 @@ md_convert_frag (bfd *headers ATTRIBUTE_UNUSED,
know (fragP->fr_type == rs_machine_dependent);
where = fragP->fr_fix;
- addressP = fragP->fr_literal + where;
+ addressP = &fragP->fr_literal[0] + where;
opcodeP = fragP->fr_opcode;
symbolP = fragP->fr_symbol;
know (symbolP);