PATCH: Remove compile time warning from tc-d30v.c

Nick Clifton nickc@redhat.com
Tue Feb 12 08:29:00 GMT 2008


Hi Guys,

   I am applying the patch below to remove a compile time warning
   (about a qualifier being discarded) which I encountered when
   compiling tc-d30v.c with a 4.2.1 version of gcc.

Cheers
   Nick

gas/ChangeLog
2008-02-12  Nick Clifton  <nickc@redhat.com>

	* config/tc-d30v.c (get_reloc): Add const qualifier to op
	argument.
	(build_insn): Drop cast that was discarding a const qualifier.

Index: gas/config/tc-d30v.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-d30v.c,v
retrieving revision 1.33
diff -c -3 -p -r1.33 tc-d30v.c
*** gas/config/tc-d30v.c	17 Oct 2007 16:45:55 -0000	1.33
--- gas/config/tc-d30v.c	12 Feb 2008 08:20:29 -0000
*************** postfix (char *p)
*** 352,358 ****
   }

   static bfd_reloc_code_real_type
! get_reloc (struct d30v_operand *op, int rel_flag)
   {
     switch (op->bits)
       {
--- 352,358 ----
   }

   static bfd_reloc_code_real_type
! get_reloc (const struct d30v_operand *op, int rel_flag)
   {
     switch (op->bits)
       {
*************** build_insn (struct d30v_insn *opcode, ex
*** 538,544 ****
   	    as_fatal (_("too many fixups"));

   	  fixups->fix[fixups->fc].reloc =
! 	    get_reloc ((struct d30v_operand *) 
&d30v_operand_table[form->operands[i]], op->reloc_flag);
   	  fixups->fix[fixups->fc].size = 4;
   	  fixups->fix[fixups->fc].exp = opers[i];
   	  fixups->fix[fixups->fc].operand = form->operands[i];
--- 538,544 ----
   	    as_fatal (_("too many fixups"));

   	  fixups->fix[fixups->fc].reloc =
! 	    get_reloc (d30v_operand_table + form->operands[i], op->reloc_flag);
   	  fixups->fix[fixups->fc].size = 4;
   	  fixups->fix[fixups->fc].exp = opers[i];
   	  fixups->fix[fixups->fc].operand = form->operands[i];



More information about the Binutils mailing list