This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to make alpha targets compile cleanly with -Wc++-compat


This patch makes alpha targets compile cleanly with
-Wc++-compat on gcc.4.5.0 20090908.

The patch is tested on:
alpha-linux alpha-freebsd

Thanks,
Martin

Attachment: alphacpp.changelog
Description: Binary data

diff -urp src.head/bfd/doc/chew.c src.alphacpp/bfd/doc/chew.c
--- src.head/bfd/doc/chew.c	2009-09-07 13:21:17.708287000 -0700
+++ src.alphacpp/bfd/doc/chew.c	2009-09-23 10:51:05.805269000 -0700
@@ -130,7 +130,7 @@ init_string_with_size (buffer, size)
 {
   buffer->write_idx = 0;
   buffer->size = size;
-  buffer->ptr = malloc (size);
+  buffer->ptr = (char *) malloc (size);
 }
 
 static void
@@ -201,7 +201,7 @@ catchar (buffer, ch)
   if (buffer->write_idx == buffer->size)
     {
       buffer->size *= 2;
-      buffer->ptr = realloc (buffer->ptr, buffer->size);
+      buffer->ptr = (char *) realloc (buffer->ptr, buffer->size);
     }
 
   buffer->ptr[buffer->write_idx++] = ch;
@@ -228,7 +228,7 @@ catbuf (buffer, buf, len)
     {
       while (buffer->write_idx + len >= buffer->size)
 	buffer->size *= 2;
-      buffer->ptr = realloc (buffer->ptr, buffer->size);
+      buffer->ptr = (char *) realloc (buffer->ptr, buffer->size);
     }
   memcpy (buffer->ptr + buffer->write_idx, buf, len);
   buffer->write_idx += len;
@@ -1177,7 +1177,7 @@ nextword (string, word)
 	}
     }
 
-  *word = malloc (length + 1);
+  *word = (char *) malloc (length + 1);
 
   dst = *word;
   src = word_start;
diff -urp src.head/bfd/ecoff.c src.alphacpp/bfd/ecoff.c
--- src.head/bfd/ecoff.c	2009-08-31 10:37:21.321348000 -0700
+++ src.alphacpp/bfd/ecoff.c	2009-09-23 11:19:57.325872000 -0700
@@ -89,7 +89,7 @@ _bfd_ecoff_mkobject (bfd *abfd)
 {
   bfd_size_type amt = sizeof (ecoff_data_type);
 
-  abfd->tdata.ecoff_obj_data = bfd_zalloc (abfd, amt);
+  abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
   if (abfd->tdata.ecoff_obj_data == NULL)
     return FALSE;
 
@@ -193,7 +193,7 @@ _bfd_ecoff_new_section_hook (bfd *abfd, 
 bfd_boolean
 _bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr)
 {
-  struct internal_filehdr *internal_f = filehdr;
+  struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
   enum bfd_architecture arch;
   unsigned long mach;
 
@@ -366,7 +366,7 @@ _bfd_ecoff_styp_to_sec_flags (bfd *abfd 
 			      asection *section ATTRIBUTE_UNUSED,
 			      flagword * flags_ptr)
 {
-  struct internal_scnhdr *internal_s = hdr;
+  struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
   long styp_flags = internal_s->s_flags;
   flagword sec_flags = 0;
 
@@ -614,7 +614,7 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abf
      the symbols, so we swap them here.  */
   amt = internal_symhdr->ifdMax;
   amt *= sizeof (struct fdr);
-  debug->fdr = bfd_alloc (abfd, amt);
+  debug->fdr = (FDR *) bfd_alloc (abfd, amt);
   if (debug->fdr == NULL)
     return FALSE;
   external_fdr_size = backend->debug_swap.external_fdr_size;
@@ -882,7 +882,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd
 
   internal_size = bfd_get_symcount (abfd);
   internal_size *= sizeof (ecoff_symbol_type);
-  internal = bfd_alloc (abfd, internal_size);
+  internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size);
   if (internal == NULL)
     return FALSE;
 
@@ -1580,11 +1580,11 @@ ecoff_slurp_reloc_table (bfd *abfd,
 
   amt = section->reloc_count;
   amt *= sizeof (arelent);
-  internal_relocs = bfd_alloc (abfd, amt);
+  internal_relocs = (arelent *) bfd_alloc (abfd, amt);
 
   external_reloc_size = backend->external_reloc_size;
   amt = external_reloc_size * section->reloc_count;
-  external_relocs = bfd_alloc (abfd, amt);
+  external_relocs = (char *) bfd_alloc (abfd, amt);
   if (internal_relocs == NULL || external_relocs == NULL)
     return FALSE;
   if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0)
@@ -1730,7 +1730,8 @@ _bfd_ecoff_find_nearest_line (bfd *abfd,
     {
       bfd_size_type amt = sizeof (struct ecoff_find_line);
 
-      ecoff_data (abfd)->find_line_info = bfd_zalloc (abfd, amt);
+      ecoff_data (abfd)->find_line_info =
+          (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
       if (ecoff_data (abfd)->find_line_info == NULL)
 	return FALSE;
     }
@@ -1955,7 +1956,7 @@ ecoff_compute_section_file_positions (bf
   /* Sort the sections by VMA.  */
   amt = abfd->section_count;
   amt *= sizeof (asection *);
-  sorted_hdrs = bfd_malloc (amt);
+  sorted_hdrs = (asection **) bfd_malloc (amt);
   if (sorted_hdrs == NULL)
     return FALSE;
   for (current = abfd->sections, i = 0;
@@ -2908,7 +2909,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
   parsed_size = mapdata->parsed_size;
   bfd_release (abfd, (void *) mapdata);
 
-  raw_armap = bfd_alloc (abfd, parsed_size);
+  raw_armap = (char *) bfd_alloc (abfd, parsed_size);
   if (raw_armap == NULL)
     return FALSE;
 
@@ -2975,7 +2976,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
 
   amt = ardata->symdef_count;
   amt *= sizeof (struct symdef);
-  symdef_ptr = bfd_alloc (abfd, amt);
+  symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
   if (!symdef_ptr)
     return FALSE;
 
@@ -3091,7 +3092,7 @@ _bfd_ecoff_write_armap (bfd *abfd,
   if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4)
     return FALSE;
 
-  hashtable = bfd_zalloc (abfd, symdefsize);
+  hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
   if (!hashtable)
     return FALSE;
 
@@ -3211,7 +3212,7 @@ _bfd_ecoff_bfd_link_hash_table_create (b
   struct ecoff_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct ecoff_link_hash_table);
 
-  ret = bfd_malloc (amt);
+  ret = (struct ecoff_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
     return NULL;
   if (!_bfd_link_hash_table_init (&ret->root, abfd,
@@ -3269,7 +3270,7 @@ ecoff_link_add_externals (bfd *abfd,
 
   amt = ext_count;
   amt *= sizeof (struct bfd_link_hash_entry *);
-  sym_hash = bfd_alloc (abfd, amt);
+  sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
   if (!sym_hash)
     return FALSE;
   ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
@@ -3483,7 +3484,7 @@ ecoff_link_add_object_symbols (bfd *abfd
       || bfd_bread (external_ext, esize, abfd) != esize)
     goto error_return;
 
-  ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+  ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
   if (ssext == NULL && symhdr->issExtMax != 0)
     goto error_return;
 
@@ -3549,7 +3550,7 @@ ecoff_link_check_archive_element (bfd *a
       || bfd_bread (external_ext, esize, abfd) != esize)
     goto error_return;
 
-  ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+  ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
   if (ssext == NULL && symhdr->issExtMax != 0)
     goto error_return;
 
@@ -3838,7 +3839,7 @@ ecoff_final_link_debug_accumulate (bfd *
   else									 \
     {									 \
       bfd_size_type amt = (bfd_size_type) size * symhdr->count;		 \
-      debug->ptr = bfd_malloc (amt);					 \
+      debug->ptr = (type) bfd_malloc (amt);                              \
       if (debug->ptr == NULL)						 \
 	{								 \
           ret = FALSE;							 \
@@ -4083,7 +4084,7 @@ ecoff_reloc_link_order (bfd *output_bfd,
       bfd_byte *buf;
 
       size = bfd_get_reloc_size (rel.howto);
-      buf = bfd_zmalloc (size);
+      buf = (bfd_byte *) bfd_zmalloc (size);
       if (buf == NULL)
 	return FALSE;
       rstat = _bfd_relocate_contents (rel.howto, output_bfd,
@@ -4192,7 +4193,7 @@ ecoff_reloc_link_order (bfd *output_bfd,
 
   /* Get some memory and swap out the reloc.  */
   external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size;
-  rbuf = bfd_malloc (external_reloc_size);
+  rbuf = (bfd_byte *) bfd_malloc (external_reloc_size);
   if (rbuf == NULL)
     return FALSE;
 
diff -urp src.head/bfd/ecofflink.c src.alphacpp/bfd/ecofflink.c
--- src.head/bfd/ecofflink.c	2009-06-16 09:07:19.310646000 -0700
+++ src.alphacpp/bfd/ecofflink.c	2009-09-23 10:51:05.974296000 -0700
@@ -1084,8 +1084,8 @@ ecoff_add_string (ainfo, info, debug, fd
   len = strlen (string);
   if (info->relocatable)
     {
-      if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end, (PTR) string,
-			       len + 1))
+      if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end,
+                               (bfd_byte *) string, len + 1))
 	return -1;
       ret = symhdr->issMax;
       symhdr->issMax += len + 1;
@@ -1207,7 +1207,7 @@ bfd_ecoff_debug_accumulate_other (handle
 	}
       (*swap_sym_out) (output_bfd, &internal_sym, external_sym);
       add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end,
-			  external_sym,
+			  (bfd_byte *) external_sym,
 			  (unsigned long) output_swap->external_sym_size);
       ++fdr.csym;
       ++output_symhdr->isymMax;
@@ -1228,7 +1228,7 @@ bfd_ecoff_debug_accumulate_other (handle
     }
   (*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr);
   add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end,
-		      external_fdr,
+		      (bfd_byte *) external_fdr,
 		      (unsigned long) output_swap->external_fdr_size);
 
   ++output_symhdr->ifdMax;
@@ -1338,8 +1338,8 @@ bfd_ecoff_debug_one_external (abfd, debu
 		- (char *) debug->external_ext)
       < (symhdr->iextMax + 1) * external_ext_size)
     {
-      char *external_ext = debug->external_ext;
-      char *external_ext_end = debug->external_ext_end;
+      char *external_ext = (char *) debug->external_ext;
+      char *external_ext_end = (char *) debug->external_ext_end;
       if (! ecoff_add_bytes ((char **) &external_ext,
 			     (char **) &external_ext_end,
 			     (symhdr->iextMax + 1) * (size_t) external_ext_size))
@@ -1503,7 +1503,7 @@ ecoff_write_symhdr (abfd, debug, swap, w
   SET (cbExtOffset, iextMax, swap->external_ext_size);
 #undef SET
 
-  buff = (PTR) bfd_malloc (swap->external_hdr_size);
+  buff = (char *) bfd_malloc (swap->external_hdr_size);
   if (buff == NULL && swap->external_hdr_size != 0)
     goto error_return;
 
diff -urp src.head/bfd/elf64-alpha.c src.alphacpp/bfd/elf64-alpha.c
--- src.head/bfd/elf64-alpha.c	2009-06-16 09:07:19.779559000 -0700
+++ src.alphacpp/bfd/elf64-alpha.c	2009-09-23 10:51:06.061285000 -0700
@@ -103,6 +103,57 @@ bfd_boolean elf64_alpha_use_secureplt = 
 
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
 
+
+/* Used to implement multiple .got subsections.  */
+struct alpha_elf_got_entry
+{
+  struct alpha_elf_got_entry *next;
+
+  /* Which .got subsection?  */
+  bfd *gotobj;
+
+  /* The addend in effect for this entry.  */
+  bfd_vma addend;
+
+  /* The .got offset for this entry.  */
+  int got_offset;
+
+  /* The .plt offset for this entry.  */
+  int plt_offset;
+
+  /* How many references to this entry?  */
+  int use_count;
+
+  /* The relocation type of this entry.  */
+  unsigned char reloc_type;
+
+  /* How a LITERAL is used.  */
+  unsigned char flags;
+
+  /* Have we initialized the dynamic relocation for this entry?  */
+  unsigned char reloc_done;
+
+  /* Have we adjusted this entry for SEC_MERGE?  */
+  unsigned char reloc_xlated;
+};
+
+struct alpha_elf_reloc_entry
+{
+  struct alpha_elf_reloc_entry *next;
+
+  /* Which .reloc section? */
+  asection *srel;
+
+  /* What kind of relocation? */
+  unsigned int rtype;
+
+  /* Is this against read-only section? */
+  unsigned int reltext : 1;
+
+  /* How many did we find?  */
+  unsigned long count;
+};
+
 struct alpha_elf_link_hash_entry
 {
   struct elf_link_hash_entry root;
@@ -125,56 +176,11 @@ struct alpha_elf_link_hash_entry
 #define ALPHA_ELF_LINK_HASH_TLS_IE	 0x80
 
   /* Used to implement multiple .got subsections.  */
-  struct alpha_elf_got_entry
-  {
-    struct alpha_elf_got_entry *next;
-
-    /* Which .got subsection?  */
-    bfd *gotobj;
-
-    /* The addend in effect for this entry.  */
-    bfd_vma addend;
-
-    /* The .got offset for this entry.  */
-    int got_offset;
-
-    /* The .plt offset for this entry.  */
-    int plt_offset;
-
-    /* How many references to this entry?  */
-    int use_count;
-
-    /* The relocation type of this entry.  */
-    unsigned char reloc_type;
-
-    /* How a LITERAL is used.  */
-    unsigned char flags;
-
-    /* Have we initialized the dynamic relocation for this entry?  */
-    unsigned char reloc_done;
-
-    /* Have we adjusted this entry for SEC_MERGE?  */
-    unsigned char reloc_xlated;
-  } *got_entries;
+  struct alpha_elf_got_entry *got_entries;
 
   /* Used to count non-got, non-plt relocations for delayed sizing
      of relocation sections.  */
-  struct alpha_elf_reloc_entry
-  {
-    struct alpha_elf_reloc_entry *next;
-
-    /* Which .reloc section? */
-    asection *srel;
-
-    /* What kind of relocation? */
-    unsigned int rtype;
-
-    /* Is this against read-only section? */
-    unsigned int reltext : 1;
-
-    /* How many did we find?  */
-    unsigned long count;
-  } *reloc_entries;
+  struct alpha_elf_reloc_entry *reloc_entries;
 };
 
 /* Alpha ELF linker hash table.  */
@@ -458,8 +464,9 @@ elf64_alpha_reloc_gpdisp (bfd *abfd, are
    from smaller values.  Start with zero, widen, *then* decrement.  */
 #define MINUS_ONE	(((bfd_vma)0) - 1)
 
+
 #define SKIP_HOWTO(N) \
-  HOWTO(N, 0, 0, 0, 0, 0, 0, elf64_alpha_reloc_bad, 0, 0, 0, 0, 0)
+  HOWTO(N, 0, 0, 0, 0, 0, complain_overflow_dont, elf64_alpha_reloc_bad, 0, 0, 0, 0, 0)
 
 static reloc_howto_type elf64_alpha_howto_table[] =
 {
@@ -5062,7 +5069,7 @@ elf64_alpha_final_link (bfd *abfd, struc
 		 interesting information, try to find the symbol in
 		 the linker global hash table and save the information
 		 for the output external symbols.  */
-	      eraw_src = input_debug.external_ext;
+	      eraw_src = (char *) input_debug.external_ext;
 	      eraw_end = (eraw_src
 			  + (input_debug.symbolic_header.iextMax
 			     * input_swap->external_ext_size));
diff -urp src.head/gas/config/tc-alpha.c src.alphacpp/gas/config/tc-alpha.c
--- src.head/gas/config/tc-alpha.c	2009-08-14 10:59:49.534505000 -0700
+++ src.alphacpp/gas/config/tc-alpha.c	2009-09-23 10:51:06.227103000 -0700
@@ -75,10 +75,15 @@
 #define MAX_INSN_FIXUPS		 2
 #define MAX_INSN_ARGS		 5
 
+/* Used since new relocation types are introduced in this
+   file (DUMMY_RELOC_LITUSE_*) */
+typedef int extended_bfd_reloc_code_real_type;
+
 struct alpha_fixup
 {
   expressionS exp;
-  bfd_reloc_code_real_type reloc;
+  /* bfd_reloc_code_real_type reloc; */
+  extended_bfd_reloc_code_real_type reloc;
 #ifdef OBJ_EVAX
   symbolS *xtrasym, *procsym;
 #endif
@@ -444,7 +449,7 @@ static const struct alpha_reloc_op_tag
   const char *name;				/* String to lookup.  */
   size_t length;				/* Size of the string.  */
   operatorT op;					/* Which operator to use.  */
-  bfd_reloc_code_real_type reloc;		/* Relocation before frob.  */
+  extended_bfd_reloc_code_real_type reloc;
   unsigned int require_seq : 1;			/* Require a sequence number.  */
   unsigned int allow_seq : 1;			/* Allow a sequence number.  */
 }
@@ -565,7 +570,7 @@ static const char * const mskXh_op[] = {
 static const char * const stX_op[] = { "stb", "stw", "stl", "stq" };
 static const char * const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL };
 
-static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, bfd_reloc_code_real_type);
+static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, extended_bfd_reloc_code_real_type);
 static void emit_insn (struct alpha_insn *);
 static void assemble_tokens (const char *, const expressionS *, int, int);
 #ifdef OBJ_EVAX
@@ -587,7 +592,8 @@ get_alpha_reloc_tag (long sequence)
       size_t len = strlen (buffer);
       const char *errmsg;
 
-      info = xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);
+      info = (struct alpha_reloc_tag *)
+          xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);
 
       info->segment = now_seg;
       info->sequence = sequence;
@@ -1764,8 +1770,9 @@ emit_insn (struct alpha_insn *insn)
 	}
       else
 	{
-	  reloc_howto_type *reloc_howto
-	    = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
+	  reloc_howto_type *reloc_howto =
+              bfd_reloc_type_lookup (stdoutput,
+                                     (bfd_reloc_code_real_type) fixup->reloc);
 	  gas_assert (reloc_howto);
 
 	  size = bfd_get_reloc_size (reloc_howto);
@@ -1787,7 +1794,7 @@ emit_insn (struct alpha_insn *insn)
 	}
 
       fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
-			  &fixup->exp, pcrel, fixup->reloc);
+			  &fixup->exp, pcrel, (bfd_reloc_code_real_type) fixup->reloc);
 
       /* Turn off complaints that the addend is too large for some fixups,
          and copy in the sequence number for the explicit relocations.  */
@@ -2002,7 +2009,7 @@ assemble_insn (const struct alpha_opcode
 	       const expressionS *tok,
 	       int ntok,
 	       struct alpha_insn *insn,
-	       bfd_reloc_code_real_type reloc)
+	       extended_bfd_reloc_code_real_type reloc)
 {
   const struct alpha_operand *reloc_operand = NULL;
   const expressionS *reloc_exp = NULL;
@@ -2125,7 +2132,8 @@ assemble_insn (const struct alpha_opcode
       else if (reloc < BFD_RELOC_UNUSED && reloc > 0)
 	{
 	  reloc_howto_type *reloc_howto
-	    = bfd_reloc_type_lookup (stdoutput, reloc);
+              = bfd_reloc_type_lookup (stdoutput,
+                                       (bfd_reloc_code_real_type) reloc);
 	  if (reloc_operand == NULL
 	      || reloc_howto->bitsize != reloc_operand->bits)
 	    {
@@ -2168,7 +2176,7 @@ emit_ir_load (const expressionS *tok,
     basereg = tok[2].X_add_number;
 
   lituse = load_expression (tok[0].X_add_number, &tok[1],
-			    &basereg, &newtok[1], opname);
+			    &basereg, &newtok[1], (const char *) opname);
 
   if (basereg == alpha_gp_register &&
       (symlen > 4 && strcmp (&symname [symlen - 4], "..lk") == 0))
@@ -2215,7 +2223,7 @@ emit_loadstore (const expressionS *tok,
 	as_bad (_("macro requires $at register while noat in effect"));
 
       lituse = load_expression (AXP_REG_AT, &tok[1], 
-				&basereg, &newtok[1], opname);
+				&basereg, &newtok[1], (const char *) opname);
     }
   else
     {
@@ -3290,7 +3298,7 @@ assemble_tokens (const char *opname,
   const struct alpha_opcode *opcode;
   const struct alpha_macro *macro;
   int cpumatch = 1;
-  bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;
+  extended_bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;
 
 #ifdef RELOC_OP_P
   /* If a user-specified relocation is present, this is not a macro.  */
@@ -3723,7 +3731,8 @@ s_alpha_ent (int dummy ATTRIBUTE_UNUSED)
 	  sym = symbol_find_or_make (name);
 	  symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
 
-	  cur_frame_data = calloc (1, sizeof (*cur_frame_data));
+	  cur_frame_data = (struct alpha_elf_frame_data *)
+              calloc (1, sizeof (*cur_frame_data));
 	  cur_frame_data->func_sym = sym;
 
 	  /* Provide sensible defaults.  */
@@ -3779,7 +3788,7 @@ s_alpha_end (int dummy ATTRIBUTE_UNUSED)
 	  if (sym && cur_frame_data)
 	    {
 	      OBJ_SYMFIELD_TYPE *obj = symbol_get_obj (sym);
-	      expressionS *exp = xmalloc (sizeof (expressionS));
+	      expressionS *exp = (expressionS *) xmalloc (sizeof (expressionS));
 
 	      obj->size = exp;
 	      exp->X_op = O_subtract;
@@ -3947,7 +3956,7 @@ s_alpha_file (int ignore ATTRIBUTE_UNUSE
       discard_rest_of_line ();
 
       len = input_line_pointer - start;
-      first_file_directive = xmalloc (len + 1);
+      first_file_directive = (char *) xmalloc (len + 1);
       memcpy (first_file_directive, start, len);
       first_file_directive[len] = '\0';
 
@@ -5425,7 +5434,7 @@ md_begin (void)
 
       if ((slash = strchr (name, '/')) != NULL)
 	{
-	  char *p = xmalloc (strlen (name));
+	  char *p = (char *) xmalloc (strlen (name));
 
 	  memcpy (p, name, slash - name);
 	  strcpy (p + (slash - name), slash + 1);
@@ -6207,8 +6216,8 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UN
 {
   arelent *reloc;
 
-  reloc = xmalloc (sizeof (* reloc));
-  reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+  reloc = (arelent *) xmalloc (sizeof (* reloc));
+  reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
   reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
 
diff -urp src.head/gas/ecoff.c src.alphacpp/gas/ecoff.c
--- src.head/gas/ecoff.c	2009-09-07 13:21:22.825448000 -0700
+++ src.alphacpp/gas/ecoff.c	2009-09-23 10:51:06.347116000 -0700
@@ -3323,7 +3323,7 @@ mark_stabs (int ignore ATTRIBUTE_UNUSED)
     {
       /* Add a dummy @stabs dymbol.  */
       stabs_seen = 1;
-      (void) add_ecoff_symbol (stabs_symbol, stNil, scInfo,
+      (void) add_ecoff_symbol (stabs_symbol, st_Nil, sc_Info,
 			       (symbolS *) NULL,
 			       (bfd_vma) 0, (symint_t) -1,
 			       ECOFF_MARK_STAB (0));
@@ -3616,7 +3616,7 @@ ecoff_add_bytes (char **buf,
   if (need < PAGE_SIZE)
     need = PAGE_SIZE;
   want = (*bufend - *buf) + need;
-  *buf = xrealloc (*buf, want);
+  *buf = (char *) xrealloc (*buf, want);
   *bufend = *buf + want;
   return *buf + at;
 }
@@ -4129,7 +4129,7 @@ ecoff_build_symbols (const struct ecoff_
 			sym_ptr->ecoff_sym.asym.iss =
 			  begin_ptr->ecoff_sym.asym.iss;
 
-		      begin_type = begin_ptr->ecoff_sym.asym.st;
+		      begin_type = (st_t) begin_ptr->ecoff_sym.asym.st;
 		      if (begin_type == st_File
 			  || begin_type == st_Block)
 			{
@@ -4697,7 +4697,7 @@ ecoff_build_debug (HDRR *hdr,
 
   /* Build the symbolic information.  */
   offset = 0;
-  buf = xmalloc (PAGE_SIZE);
+  buf = (char *) xmalloc (PAGE_SIZE);
   bufend = buf + PAGE_SIZE;
 
   /* Build the line number information.  */
Only in src.alphacpp/sid/component/cfgroot/libltdl: config-h.in]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]