gas: Silence GCC 10 warning tc-vax.c
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 14:41:07 +0000 (07:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 14:41:07 +0000 (07:41 -0700)
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.

gas/ChangeLog
gas/config/tc-vax.c

index 052d180398a4a248e7e7ba8f77040bade3398ad0..980a84f6cf758dddeb52190a7335651b474810b3 100644 (file)
@@ -1,3 +1,10 @@
+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
index 5634566945b821a2239ee776f37e3fd4a46db5bf..f606c157bc7a931c7739d3d4315971aa7978e223 100644 (file)
@@ -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);