[binutils-gdb] gas frag_var

Alan Modra amodra@sourceware.org
Wed Jul 9 00:05:59 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=37899b113c4e5829d6fc6afa62ff190a472da272

commit 37899b113c4e5829d6fc6afa62ff190a472da272
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jul 9 08:54:56 2025 +0930

    gas frag_var
    
    Many frag_var calls have unnecessary casts on arguments, no doubt from
    the days when binutils was written for K&R C.  (ie. functions were not
    prototyped so you needed to cast anything that didn't match the
    expected type after default promotions, as you still do for args
    matching a function ellipsis.)  Remove those casts.
    
            * config/tc-alpha.c (s_alpha_comm): Use offset_T for cur_size
            to avoid need for casts.  Remove casts from frag_var args.
            * config/tc-ia64.c (obj_elf_vms_common): Remove casts from
            frag_var args.
            * config/tc-m32r.c (m32r_scomm): Likewise.
            * config/tc-m68hc11.c (build_jump_insn): Likewise.
            (build_dbranch_insn): Likewise.
            * config/tc-m68k.c (md_assemble): Likewise.
            * config/tc-microblaze.c (microblaze_s_lcomm): Likewise.
            * config/tc-mmix.c (s_loc): Likewise.
            * config/tc-ppc.c (ppc_elf_lcomm, ppc_comm): Likewise.
            * config/tc-score.c (s3_s_score_lcomm): Likewise.
            * config/tc-score7.c (s7_s_score_lcomm): Likewise.
            * config/tc-sh.c (sh_cons_align): Likewise.
            * config/tc-sparc.c (s_reserve, s_common): Likewise.
            (sparc_cons_align): Likewise.
            * config/tc-tic4x.c (tic4x_seg_alloc, tic4x_bss): Likewise.
            * config/tc-tic54x.c (tic54x_bss, tic54x_space): Likewise.
            (tic54x_usect, tic54x_field): Likewise.
            * config/tc-tic6x.c (s_tic6x_scomm): Likewise.
            * config/tc-v850.c (v850_offset, v850_comm): Likewise.
            * frags.c (frag_align, frag_align_pattern, frag_align_code): Likewise.
            * gen-sframe.c (output_sframe_row_entry): Likewise.
            (output_sframe_funcdesc): Likewise.
            * read.c (s_fill, do_org, s_space, emit_leb128_expr): Likewise.
            * symbols.c (colon)): Likewise.

Diff:
---
 gas/config/tc-alpha.c      | 14 ++++++--------
 gas/config/tc-ia64.c       |  4 +---
 gas/config/tc-m32r.c       |  3 +--
 gas/config/tc-m68hc11.c    | 11 +++++------
 gas/config/tc-m68k.c       |  2 +-
 gas/config/tc-microblaze.c |  3 +--
 gas/config/tc-mmix.c       |  2 +-
 gas/config/tc-ppc.c        |  6 ++----
 gas/config/tc-score.c      |  2 +-
 gas/config/tc-score7.c     |  2 +-
 gas/config/tc-sh.c         |  3 +--
 gas/config/tc-sparc.c      |  9 +++------
 gas/config/tc-tic4x.c      |  7 ++-----
 gas/config/tc-tic54x.c     | 23 +++++++----------------
 gas/config/tc-tic6x.c      |  3 +--
 gas/config/tc-v850.c       |  6 ++----
 gas/frags.c                | 11 ++++-------
 gas/gen-sframe.c           |  6 +++---
 gas/read.c                 | 19 +++++++------------
 gas/symbols.c              |  9 ++-------
 20 files changed, 52 insertions(+), 93 deletions(-)

diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 07f457eb0a7..e66e8d6a85c 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -3552,7 +3552,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED)
       symbolS *sec_symbol;
       segT current_seg = now_seg;
       subsegT current_subseg = now_subseg;
-      int cur_size;
+      offsetT cur_size;
 
       input_line_pointer++;
       SKIP_WHITESPACE ();
@@ -3567,13 +3567,12 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED)
 
       /* Reuse stab_string_size to store the size of the section.  */
       cur_size = seg_info (sec)->stabu.stab_string_size;
-      if ((int) size > cur_size)
+      if (size > cur_size)
 	{
-	  char *pfrag
-	    = frag_var (rs_fill, 1, 1, (relax_substateT)0, NULL,
-			(valueT)size - (valueT)cur_size, NULL);
+	  char *pfrag = frag_var (rs_fill, 1, 1, 0, NULL,
+				  size - cur_size, NULL);
 	  *pfrag = 0;
-	  seg_info (sec)->stabu.stab_string_size = (int)size;
+	  seg_info (sec)->stabu.stab_string_size = size;
 	}
 
       S_SET_SEGMENT (symbolP, sec);
@@ -3598,8 +3597,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED)
       record_alignment (bss_section, log_align);
 
       symbol_set_frag (symbolP, frag_now);
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
-                        size, NULL);
+      pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
       *pfrag = 0;
 
       S_SET_SEGMENT (symbolP, bss_section);
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 2fb6b112c42..827f6b1544c 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -1152,9 +1152,7 @@ obj_elf_vms_common (int ignore ATTRIBUTE_UNUSED)
   cur_size = bfd_section_size (now_seg);
   if ((int) size > cur_size)
     {
-      char *pfrag
-        = frag_var (rs_fill, 1, 1, (relax_substateT)0, NULL,
-                    (valueT)size - (valueT)cur_size, NULL);
+      char *pfrag = frag_var (rs_fill, 1, 1, 0, NULL, size - cur_size, NULL);
       *pfrag = 0;
       bfd_set_section_size (now_seg, size);
     }
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index ba03818f95c..e9d9cc930ec 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -1572,8 +1572,7 @@ m32r_scomm (int ignore ATTRIBUTE_UNUSED)
 
       symbol_set_frag (symbolP, frag_now);
 
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
-			(char *) 0);
+      pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
       *pfrag = 0;
       S_SET_SIZE (symbolP, size);
       S_SET_SEGMENT (symbolP, sbss_section);
diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c
index 6950c572411..40dd4561c3f 100644
--- a/gas/config/tc-m68hc11.c
+++ b/gas/config/tc-m68hc11.c
@@ -1934,9 +1934,8 @@ build_jump_insn (struct m68hc11_opcode *opcode, operand operands[],
 	  number_to_chars_bigendian (op, code, 1);
 	  number_to_chars_bigendian (op + 1, 0, 1);
 	  frag_variant (rs_machine_dependent, 1, 1,
-                        ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF),
-                        operands[0].exp.X_add_symbol, (offsetT) n,
-                        op);
+			ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF),
+			operands[0].exp.X_add_symbol, n, op);
 	}
       else if (current_architecture & cpu6812)
 	{
@@ -1945,7 +1944,7 @@ build_jump_insn (struct m68hc11_opcode *opcode, operand operands[],
 	  number_to_chars_bigendian (op + 1, 0, 1);
 	  frag_var (rs_machine_dependent, 2, 2,
 		    ENCODE_RELAX (STATE_CONDITIONAL_BRANCH_6812, STATE_UNDF),
-		    operands[0].exp.X_add_symbol, (offsetT) n, op);
+		    operands[0].exp.X_add_symbol, n, op);
 	}
       else
 	{
@@ -1954,7 +1953,7 @@ build_jump_insn (struct m68hc11_opcode *opcode, operand operands[],
 	  number_to_chars_bigendian (op + 1, 0, 1);
 	  frag_var (rs_machine_dependent, 3, 3,
 		    ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF),
-		    operands[0].exp.X_add_symbol, (offsetT) n, op);
+		    operands[0].exp.X_add_symbol, n, op);
 	}
     }
 }
@@ -2044,7 +2043,7 @@ build_dbranch_insn (struct m68hc11_opcode *opcode, operand operands[],
 	  number_to_chars_bigendian (f + 1, 0, 1);
 	  frag_var (rs_machine_dependent, 3, 3,
 		    ENCODE_RELAX (STATE_XBCC_BRANCH, STATE_UNDF),
-		    operands[1].exp.X_add_symbol, (offsetT) n, f);
+		    operands[1].exp.X_add_symbol, n, f);
 	}
     }
 }
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 510a1bcc65f..446d9d8a2ef 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4410,7 +4410,7 @@ md_assemble (char *str)
 	  fixP->fx_pcrel_adjust = the_ins.reloc[m].pcrel_fix;
 	}
       (void) frag_var (rs_machine_dependent, FRAG_VAR_SIZE, 0,
-		       (relax_substateT) (the_ins.fragb[n].fragty),
+		       the_ins.fragb[n].fragty,
 		       the_ins.fragb[n].fadd, the_ins.fragb[n].foff, to_beg_P);
     }
   gas_assert (the_ins.nfrag >= 1);
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 917b8f64c80..097a0ead4d4 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -244,8 +244,7 @@ microblaze_s_lcomm (int xxx ATTRIBUTE_UNUSED)
   if (S_GET_SEGMENT (symbolP) == current_seg)
     symbol_get_frag (symbolP)->fr_symbol = 0;
   symbol_set_frag (symbolP, frag_now);
-  pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
-		    (char *) 0);
+  pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
   *pfrag = 0;
   S_SET_SIZE (symbolP, size);
   S_SET_SEGMENT (symbolP, current_seg);
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index dea91816b0f..68fd52d06a1 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -4086,7 +4086,7 @@ s_loc (int ignore ATTRIBUTE_UNUSED)
 	  loc_asserts->frag = frag_now;
 	}
 
-      p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0);
+      p = frag_var (rs_org, 1, 1, 0, sym, off, NULL);
       *p = 0;
     }
 
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index d8a7d21bdec..bb5d387317b 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -2470,8 +2470,7 @@ ppc_elf_lcomm (int xxx ATTRIBUTE_UNUSED)
   if (S_GET_SEGMENT (symbolP) == bss_section)
     symbol_get_frag (symbolP)->fr_symbol = 0;
   symbol_set_frag (symbolP, frag_now);
-  pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
-		    (char *) 0);
+  pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
   *pfrag = 0;
   S_SET_SIZE (symbolP, size);
   S_SET_SEGMENT (symbolP, bss_section);
@@ -4465,8 +4464,7 @@ ppc_comm (int lcomm)
       frag_align (align, 0, 0);
 
       symbol_set_frag (def_sym, frag_now);
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, def_sym,
-			def_size, (char *) NULL);
+      pfrag = frag_var (rs_org, 1, 1, 0, def_sym, def_size, NULL);
       *pfrag = 0;
       S_SET_SEGMENT (def_sym, section->segment);
       symbol_get_tc (def_sym)->align = align;
diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c
index 79dcf773a3d..b19c7579522 100644
--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -6189,7 +6189,7 @@ s3_s_score_lcomm (int bytes_p)
         symbol_get_frag (symbolP)->fr_symbol = NULL;
 
       symbol_set_frag (symbolP, frag_now);
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) temp, NULL);
+      pfrag = frag_var (rs_org, 1, 1, 0, symbolP, temp, NULL);
       *pfrag = 0;
 
 
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
index b11f69f2ba9..abe54164311 100644
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -6036,7 +6036,7 @@ s7_s_score_lcomm (int bytes_p)
         symbol_get_frag (symbolP)->fr_symbol = NULL;
 
       symbol_set_frag (symbolP, frag_now);
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) temp, NULL);
+      pfrag = frag_var (rs_org, 1, 1, 0, symbolP, temp, NULL);
       *pfrag = 0;
 
 
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index c37306f2f58..90bd5c2f4de 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -3206,8 +3206,7 @@ sh_cons_align (int nbytes)
       return;
     }
 
-  frag_var (rs_align_test, 1, 1, (relax_substateT) 0,
-	    (symbolS *) NULL, (offsetT) nalign, (char *) NULL);
+  frag_var (rs_align_test, 1, 1, 0, NULL, nalign, NULL);
 
   record_alignment (now_seg, nalign);
 }
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 6db848181e1..e7179f15d84 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -4219,8 +4219,7 @@ s_reserve (int ignore ATTRIBUTE_UNUSED)
 	    symbol_get_frag (symbolP)->fr_symbol = NULL;
 
 	  symbol_set_frag (symbolP, frag_now);
-	  pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-			    (offsetT) size, (char *) 0);
+	  pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
 	  *pfrag = 0;
 
 	  S_SET_SEGMENT (symbolP, bss_section);
@@ -4336,8 +4335,7 @@ s_common (int ignore ATTRIBUTE_UNUSED)
 	  if (S_GET_SEGMENT (symbolP) == bss_section)
 	    symbol_get_frag (symbolP)->fr_symbol = 0;
 	  symbol_set_frag (symbolP, frag_now);
-	  p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-			(offsetT) size, (char *) 0);
+	  p = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
 	  *p = 0;
 	  S_SET_SEGMENT (symbolP, bss_section);
 	  S_CLEAR_EXTERNAL (symbolP);
@@ -4635,8 +4633,7 @@ sparc_cons_align (int nbytes)
       return;
     }
 
-  frag_var (rs_align_test, 1, 1, (relax_substateT) 0,
-	    (symbolS *) NULL, (offsetT) nalign, (char *) NULL);
+  frag_var (rs_align_test, 1, 1, 0, NULL, nalign, NULL);
 
   record_alignment (now_seg, nalign);
 }
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index 167a94f7024..f5284d8219f 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -695,9 +695,7 @@ tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED,
     {
       char *p;
 
-      p = frag_var (rs_fill, 1, 1, (relax_substateT) 0,
-		    (symbolS *) symbolP,
-		    size * OCTETS_PER_BYTE, (char *) 0);
+      p = frag_var (rs_fill, 1, 1, 0, symbolP, size * OCTETS_PER_BYTE, NULL);
       *p = 0;
     }
 }
@@ -772,8 +770,7 @@ tic4x_bss (int x ATTRIBUTE_UNUSED)
 
   symbol_set_frag (symbolP, frag_now);
 
-  p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-		size * OCTETS_PER_BYTE, (char *) 0);
+  p = frag_var (rs_org, 1, 1, 0, symbolP, size * OCTETS_PER_BYTE, NULL);
   *p = 0;			/* Fill char.  */
 
   S_SET_SEGMENT (symbolP, bss_section);
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index db3def4b36f..ed3efc49665 100644
--- a/gas/config/tc-tic54x.c
+++ b/gas/config/tc-tic54x.c
@@ -536,8 +536,7 @@ tic54x_bss (int x ATTRIBUTE_UNUSED)
     symbol_get_frag (symbolP)->fr_symbol = (symbolS *) NULL;
 
   symbol_set_frag (symbolP, frag_now);
-  p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-		(offsetT) (words * OCTETS_PER_BYTE), (char *) 0);
+  p = frag_var (rs_org, 1, 1, 0, symbolP, words * OCTETS_PER_BYTE, NULL);
   *p = 0;			/* Fill char.  */
 
   S_SET_SEGMENT (symbolP, bss_section);
@@ -1295,10 +1294,8 @@ tic54x_space (int arg)
       bi->seg = now_seg;
       bi->type = bes;
       bi->sym = label;
-      p = frag_var (rs_machine_dependent,
-		    65536 * 2, 1, (relax_substateT) 0,
-		    make_expr_symbol (&expn), (offsetT) 0,
-		    (char *) bi);
+      p = frag_var (rs_machine_dependent, 65536 * 2, 1, 0,
+		    make_expr_symbol (&expn), 0, (char *) bi);
       if (p)
 	*p = 0;
 
@@ -1362,9 +1359,7 @@ tic54x_space (int arg)
     }
 
   if (!need_pass_2)
-    p = frag_var (rs_fill, 1, 1,
-		  (relax_substateT) 0, (symbolS *) 0,
-		  (offsetT) octets, (char *) 0);
+    p = frag_var (rs_fill, 1, 1, 0, NULL, octets, NULL);
 
   /* Make note of how many bits of this word we've allocated so far.  */
   frag_now->tc_frag_data = bit_offset;
@@ -1470,9 +1465,7 @@ tic54x_usect (int x ATTRIBUTE_UNUSED)
 
   seg_info (seg)->bss = 1;	/* Uninitialized data.  */
 
-  p = frag_var (rs_fill, 1, 1,
-		(relax_substateT) 0, (symbolS *) line_label,
-		size * OCTETS_PER_BYTE, (char *) 0);
+  p = frag_var (rs_fill, 1, 1, 0, line_label, size * OCTETS_PER_BYTE, NULL);
   *p = 0;
 
   if (blocking_flag)
@@ -1808,10 +1801,8 @@ tic54x_field (int ignore ATTRIBUTE_UNUSED)
 	      bi->seg = now_seg;
 	      bi->type = TYPE_FIELD;
 	      bi->value = value;
-	      p = frag_var (rs_machine_dependent,
-			    4, 1, (relax_substateT) 0,
-			    make_expr_symbol (&size_exp), (offsetT) 0,
-			    (char *) bi);
+	      p = frag_var (rs_machine_dependent, 4, 1, 0,
+			    make_expr_symbol (&size_exp), 0, (char *) bi);
 	      goto getout;
 	    }
 	  else if (bit_offset == 0 || bit_offset + size > 16)
diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index aeb22395b05..b58074fbd00 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -659,8 +659,7 @@ s_tic6x_scomm (int ignore ATTRIBUTE_UNUSED)
 
       symbol_set_frag (symbolP, frag_now);
 
-      pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
-			(char *) 0);
+      pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
       *pfrag = 0;
       S_SET_SIZE (symbolP, size);
       S_SET_SEGMENT (symbolP, sbss_section);
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 09411767e7f..a5198562899 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -247,8 +247,7 @@ v850_offset (int ignore ATTRIBUTE_UNUSED)
   char *pfrag;
   int temp = get_absolute_expression ();
 
-  pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, (symbolS *)0,
-		    (offsetT) temp, (char *) 0);
+  pfrag = frag_var (rs_org, 1, 1, 0, NULL, temp, NULL);
   *pfrag = 0;
 
   demand_empty_rest_of_line ();
@@ -412,8 +411,7 @@ v850_comm (int area)
 	    }
 
 	  symbol_set_frag (symbolP, frag_now);
-	  pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-			    (offsetT) size, (char *) 0);
+	  pfrag = frag_var (rs_org, 1, 1, 0, symbolP, size, NULL);
 	  *pfrag = 0;
 	  S_SET_SIZE (symbolP, size);
 
diff --git a/gas/frags.c b/gas/frags.c
index 129c27ff52b..59699ae5943 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -325,8 +325,7 @@ frag_align (int alignment, int fill_character, int max)
     {
       char *p;
 
-      p = frag_var (rs_align, 1, 1, (relax_substateT) max,
-		    (symbolS *) 0, (offsetT) alignment, (char *) 0);
+      p = frag_var (rs_align, 1, 1, max, NULL, alignment, NULL);
       *p = fill_character;
     }
 }
@@ -344,8 +343,7 @@ frag_align_pattern (int alignment, const char *fill_pattern,
 {
   char *p;
 
-  p = frag_var (rs_align, n_fill, n_fill, (relax_substateT) max,
-		(symbolS *) 0, (offsetT) alignment, (char *) 0);
+  p = frag_var (rs_align, n_fill, n_fill, max, NULL, alignment, NULL);
   memcpy (p, fill_pattern, n_fill);
 }
 
@@ -367,9 +365,8 @@ frag_align_code (int alignment, int max)
 {
   char *p;
 
-  p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE (alignment, max), 1,
-		(relax_substateT) max, (symbolS *) 0,
-		(offsetT) alignment, (char *) 0);
+  p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE (alignment, max),
+		1, max, NULL, alignment, NULL);
   *p = NOP_OPCODE;
 }
 
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index 85d3553773b..7e29f840378 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -543,7 +543,7 @@ output_sframe_row_entry (symbolS *fde_start_addr,
   create_fre_start_addr_exp (&exp, sframe_fre->pc_begin, fde_start_addr,
 			     fde_end_addr);
   frag_grow (fre_addr_size);
-  frag_var (rs_sframe, fre_addr_size, 0, (relax_substateT) 0,
+  frag_var (rs_sframe, fre_addr_size, 0, 0,
 	    make_expr_symbol (&exp), 0, (char *) frag_now);
 #else
   gas_assert (fde_end_addr);
@@ -639,8 +639,8 @@ output_sframe_funcdesc (symbolS *start_of_fre_section,
   create_func_info_exp (&cexp, dw_fde_end_addrS, dw_fde_start_addrS,
 			func_info);
   frag_grow (1); /* Size of func info is unsigned char.  */
-  frag_var (rs_sframe, 1, 0, (relax_substateT) 0,
-	    make_expr_symbol (&cexp), 0, (char *) frag_now);
+  frag_var (rs_sframe, 1, 0, 0, make_expr_symbol (&cexp), 0,
+	    (char *) frag_now);
 #else
   out_one (func_info);
 #endif
diff --git a/gas/read.c b/gas/read.c
index 0e04fcbdeea..fefbc3aee05 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2395,10 +2395,8 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
 
       if (rep_exp.X_op == O_constant)
 	{
-	  p = frag_var (rs_fill, (int) size, (int) size,
-			(relax_substateT) 0, (symbolS *) 0,
-			(offsetT) rep_exp.X_add_number,
-			(char *) 0);
+	  p = frag_var (rs_fill, size, size, 0, NULL,
+			rep_exp.X_add_number, NULL);
 	}
       else
 	{
@@ -2422,8 +2420,7 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
 	      rep_sym = make_expr_symbol (&rep_exp);
 	    }
 
-	  p = frag_var (rs_space, (int) size, (int) size,
-			(relax_substateT) 0, rep_sym, (offsetT) 0, (char *) 0);
+	  p = frag_var (rs_space, size, size, 0, rep_sym, 0, NULL);
 	}
 
       memset (p, 0, (unsigned int) size);
@@ -2972,7 +2969,7 @@ do_org (segT segment, expressionS *exp, int fill)
 	  off = 0;
 	}
 
-      p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0);
+      p = frag_var (rs_org, 1, 1, 0, sym, off, NULL);
       *p = fill;
     }
 }
@@ -3591,8 +3588,7 @@ s_space (int mult)
 	    }
 
 	  if (!need_pass_2)
-	    p = frag_var (rs_fill, 1, 1, (relax_substateT) 0, (symbolS *) 0,
-			  (offsetT) total, (char *) 0);
+	    p = frag_var (rs_fill, 1, 1, 0, NULL, total, NULL);
 	}
       else
 	{
@@ -3609,8 +3605,7 @@ s_space (int mult)
 	    }
 
 	  if (!need_pass_2)
-	    p = frag_var (rs_space, 1, 1, (relax_substateT) 0,
-			  make_expr_symbol (&exp), (offsetT) 0, (char *) 0);
+	    p = frag_var (rs_space, 1, 1, 0, make_expr_symbol (&exp), 0, NULL);
 	}
 
       if ((val.X_op != O_constant || val.X_add_number != 0) && in_bss ())
@@ -5506,7 +5501,7 @@ emit_leb128_expr (expressionS *exp, int sign)
 	 resolve things later.  */
 
       frag_var (rs_leb128, sizeof_uleb128 (~(valueT) 0), 0, sign,
-		make_expr_symbol (exp), 0, (char *) NULL);
+		make_expr_symbol (exp), 0, NULL);
     }
 }
 
diff --git a/gas/symbols.c b/gas/symbols.c
index 6a4dea88b8f..b76415a59e7 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -531,13 +531,8 @@ colon (/* Just seen "x:" - rattle symbols & frags.  */
 			+ new_broken_words * md_long_jump_size);
 
       frag_tmp = frag_now;
-      frag_opcode = frag_var (rs_broken_word,
-			      possible_bytes,
-			      possible_bytes,
-			      (relax_substateT) 0,
-			      (symbolS *) broken_words,
-			      (offsetT) 0,
-			      NULL);
+      frag_opcode = frag_var (rs_broken_word, possible_bytes, possible_bytes,
+			      0, (symbolS *) broken_words, 0, NULL);
 
       /* We want to store the pointer to where to insert the jump
 	 table in the fr_opcode of the rs_broken_word frag.  This


More information about the Binutils-cvs mailing list