+2014-07-26 Alan Modra <amodra@gmail.com>
+
+ * config/bfin-parse.y: Don't include obstack.h.
+ * config/obj-aout.c: Likewise.
+ * config/obj-coff.c: Likewise.
+ * config/obj-som.c: Likewise.
+ * config/tc-bfin.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-rl78.c: Likewise.
+ * config/tc-rx.c: Likewise.
+ * config/tc-tic4x.c: Likewise.
+ * expr.c: Likewise.
+ * listing.c: Likewise.
+ * config/obj-elf.c (elf_file_symbol): Make name_length a size_t.
+ * config/tc-aarch64.c (symbol_locate): Likewise.
+ * config/tc-arm.c (symbol_locate): Likewise.
+ * config/tc-mmix.c (mmix_handle_mmixal): Make len_0 a size_t.
+ * config/tc-score.c (s3_build_score_ops_hsh): Make len a size_t.
+ (s3_build_dependency_insn_hsh): Likewise.
+ * config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
+ (s7_build_dependency_insn_hsh): Likewise.
+ * frags.c (frag_grow): Make parameter a size_t, and use size_t locals.
+ (frag_new): Make parameter a size_t.
+ (frag_var_init): Make max_chars and var parameters size_t.
+ (frag_var, frag_variant): Likewise.
+ (frag_room): Return a size_t.
+ (frag_align_pattern): Make n_fill parameter a size_t.
+ * frags.h: Update function prototypes.
+ * symbols.c (save_symbol_name): Make name_length a size_t.
+
2014-07-22 Sergey Guriev <sergey.s.guriev@intel.com>
Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
%{
#include "as.h"
-#include <obstack.h>
#include "bfin-aux.h" /* Opcode generating auxiliaries. */
#include "libbfd.h"
#include "as.h"
#undef NO_RELOC
#include "aout/aout64.h"
-#include "obstack.h"
void
obj_aout_frob_symbol (symbolS *sym, int *punt ATTRIBUTE_UNUSED)
#include "as.h"
#include "safe-ctype.h"
-#include "obstack.h"
#include "subsegs.h"
#include "struc-symbol.h"
|| (symbol_rootP->bsym->flags & BSF_FILE) == 0)
{
symbolS *sym;
- unsigned int name_length;
+ size_t name_length;
sym = symbol_new (s, absolute_section, 0, NULL);
symbol_set_frag (sym, &zero_address_frag);
#include "as.h"
#include "subsegs.h"
#include "aout/stab_gnu.h"
-#include "obstack.h"
static int version_seen = 0;
static int copyright_seen = 0;
valueT valu, /* Symbol value. */
fragS * frag) /* Associated fragment. */
{
- unsigned int name_length;
+ size_t name_length;
char *preserved_copy_of_name;
name_length = strlen (name) + 1; /* +1 for \0. */
valueT valu, /* Symbol value. */
fragS * frag) /* Associated fragment. */
{
- unsigned int name_length;
+ size_t name_length;
char * preserved_copy_of_name;
name_length = strlen (name) + 1; /* +1 for \0. */
int count_insns;
static void *
-allocate (int n)
+allocate (size_t n)
{
return obstack_alloc (&mempool, n);
}
#include "as.h"
#include "safe-ctype.h"
-#include "obstack.h"
#include "opcode/i960.h"
it the same alignment and address as the associated instruction. */
/* Make room for the label including the ending nul. */
- int len_0 = s - label + 1;
+ size_t len_0 = s - label + 1;
/* Save this label on the MMIX symbol obstack. Saving it on an
obstack is needless for "IS"-pseudos, but it's harmless and we
#include "as.h"
#include "struc-symbol.h"
-#include "obstack.h"
#include "safe-ctype.h"
#include "dwarf2dbg.h"
#include "libbfd.h"
#include "as.h"
#include "struc-symbol.h"
-#include "obstack.h"
#include "safe-ctype.h"
#include "dwarf2dbg.h"
#include "libbfd.h"
for (i = 0; i < sizeof (s3_score_insns) / sizeof (struct s3_asm_opcode); i++)
{
const struct s3_asm_opcode *insn = s3_score_insns + i;
- unsigned len = strlen (insn->template_name);
+ size_t len = strlen (insn->template_name);
struct s3_asm_opcode *new_opcode;
char *template_name;
new_opcode = (struct s3_asm_opcode *)
for (i = 0; i < sizeof (s3_insn_to_dependency_table) / sizeof (s3_insn_to_dependency_table[0]); i++)
{
const struct s3_insn_to_dependency *tmp = s3_insn_to_dependency_table + i;
- unsigned len = strlen (tmp->insn_name);
+ size_t len = strlen (tmp->insn_name);
struct s3_insn_to_dependency *new_i2n;
new_i2n = (struct s3_insn_to_dependency *)
for (i = 0; i < sizeof (s7_score_insns) / sizeof (struct s7_asm_opcode); i++)
{
const struct s7_asm_opcode *insn = s7_score_insns + i;
- unsigned len = strlen (insn->template_name);
+ size_t len = strlen (insn->template_name);
struct s7_asm_opcode *new_opcode;
char *template_name;
new_opcode = (struct s7_asm_opcode *)
for (i = 0; i < ARRAY_SIZE (s7_insn_to_dependency_table); i++)
{
const struct s7_insn_to_dependency *tmp = s7_insn_to_dependency_table + i;
- unsigned len = strlen (tmp->insn_name);
+ size_t len = strlen (tmp->insn_name);
struct s7_insn_to_dependency *new_i2d;
new_i2d = (struct s7_insn_to_dependency *)
#include "safe-ctype.h"
#include "opcode/tic4x.h"
#include "subsegs.h"
-#include "obstack.h"
/* OK, we accept a syntax similar to the other well known C30
assembly tools. With TIC4X_ALT_SYNTAX defined we are more
#include "as.h"
#include "safe-ctype.h"
-#include "obstack.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
do not return. Do not set up any fields of *now_frag. */
void
-frag_grow (unsigned int nchars)
+frag_grow (size_t nchars)
{
if (obstack_room (&frchain_now->frch_obstack) < nchars)
{
- long oldc;
- long newc;
+ size_t oldc;
+ size_t newc;
/* Try to allocate a bit more than needed right now. But don't do
this if we would waste too much memory. Especially necessary
newc += SIZEOF_STRUCT_FRAG;
/* Check for possible overflow. */
- if (newc < 0)
- as_fatal (_("can't extend frag %u chars"), nchars);
+ if (newc < nchars)
+ as_fatal (_("can't extend frag %lu chars"), (unsigned long) nchars);
/* Force to allocate at least NEWC bytes, but not less than the
default. */
of frchain_now. */
void
-frag_new (int old_frags_var_max_size
+frag_new (size_t old_frags_var_max_size
/* Number of chars (already allocated on obstack frags) in
variable_length part of frag. */)
{
frag_now_growth past the new chars. */
char *
-frag_more (int nchars)
+frag_more (size_t nchars)
{
register char *retval;
new frag. */
static void
-frag_var_init (relax_stateT type, int max_chars, int var,
- relax_substateT subtype, symbolS *symbol, offsetT offset,
+frag_var_init (relax_stateT type, size_t max_chars, size_t var,
+ relax_substateT subtype, symbolS *symbol, offsetT offset,
char *opcode)
{
frag_now->fr_var = var;
to write into. */
char *
-frag_var (relax_stateT type, int max_chars, int var, relax_substateT subtype,
- symbolS *symbol, offsetT offset, char *opcode)
+frag_var (relax_stateT type, size_t max_chars, size_t var,
+ relax_substateT subtype, symbolS *symbol, offsetT offset,
+ char *opcode)
{
register char *retval;
No call to frag_grow is done. */
char *
-frag_variant (relax_stateT type, int max_chars, int var,
+frag_variant (relax_stateT type, size_t max_chars, size_t var,
relax_substateT subtype, symbolS *symbol, offsetT offset,
char *opcode)
{
\f
/* Return the number of bytes by which the current frag can be grown. */
-int
+size_t
frag_room (void)
{
return obstack_room (&frchain_now->frch_obstack);
void
frag_align_pattern (int alignment, const char *fill_pattern,
- int n_fill, int max)
+ size_t n_fill, int max)
{
char *p;
void frag_init (void);
fragS *frag_alloc (struct obstack *);
-void frag_grow (unsigned int nchars);
-char *frag_more (int nchars);
+void frag_grow (size_t nchars);
+char *frag_more (size_t nchars);
void frag_align (int alignment, int fill_character, int max);
void frag_align_pattern (int alignment, const char *fill_pattern,
- int n_fill, int max);
+ size_t n_fill, int max);
void frag_align_code (int alignment, int max);
-void frag_new (int old_frags_var_max_size);
+void frag_new (size_t old_frags_var_max_size);
void frag_wane (fragS * fragP);
-int frag_room (void);
+size_t frag_room (void);
char *frag_variant (relax_stateT type,
- int max_chars,
- int var,
+ size_t max_chars,
+ size_t var,
relax_substateT subtype,
symbolS * symbol,
offsetT offset,
char *opcode);
char *frag_var (relax_stateT type,
- int max_chars,
- int var,
+ size_t max_chars,
+ size_t var,
relax_substateT subtype,
symbolS * symbol,
offsetT offset,
#include "as.h"
#include "filenames.h"
-#include "obstack.h"
#include "safe-ctype.h"
#include "input-file.h"
#include "subsegs.h"
static char *
save_symbol_name (const char *name)
{
- unsigned int name_length;
+ size_t name_length;
char *ret;
name_length = strlen (name) + 1; /* +1 for \0. */