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]

Re: [PATCH] add some const qualifiers in opcodes


On Mon, Feb 29, 2016 at 08:46:19AM -0500, tbsaunde+binutils@tbsaunde.org wrote:
> opcodes/ChangeLog:
> 
> 2016-02-29  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
> 
> 	* mcore-opc.h: Add const qualifiers.
> 	* microblaze-opc.h (struct op_code_struct): Likewise.
> 	* sh-opc.h: Likewise.
> 	* tic4x-dis.c (tic4x_print_indirect): Likewise.
> 	(tic4x_print_op): Likewise.
> 
> include/ChangeLog:
> 
> 2016-02-29  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
> 
> 	* opcode/dlx.h (struct dlx_opcode): Add const qualifiers.
> 	* opcode/h8300.h (struct h8_opcode): Likewise.
> 	* opcode/hppa.h (struct pa_opcode): Likewise.
> 	* opcode/msp430.h: Likewise.
> 	* opcode/spu.h (struct spu_opcode): Likewise.
> 	* opcode/tic30.h (struct _register): Likewise.
> 	* opcode/tic4x.h (struct tic4x_register): Likewise.
> 	(struct tic4x_cond): Likewise.
> 	(struct tic4x_indirect): Likewise.
> 	(struct tic4x_inst): Likewise.
> 	* opcode/visium.h (struct reg_entry): Likewise.

OK, but

> diff --git a/include/opcode/tic4x.h b/include/opcode/tic4x.h
> index 44f868b..7147afd 100644
> --- a/include/opcode/tic4x.h
> +++ b/include/opcode/tic4x.h
> @@ -58,7 +58,7 @@ c4x_reg_t;
>  
>  struct tic4x_register
>  {
> -  char *        name;
> +  const char *        name;
>    unsigned long regno;
>  };
>  

please fix the formatting here and other places you patch this file.

> diff --git a/opcodes/mcore-opc.h b/opcodes/mcore-opc.h
> index c94ab2f..606e05a 100644
> --- a/opcodes/mcore-opc.h
> +++ b/opcodes/mcore-opc.h
> @@ -33,7 +33,7 @@ mcore_opclass;
>  
>  typedef struct inst
>  {
> -  char *         name;
> +  const char *         name;
>    mcore_opclass  opclass;
>    unsigned char  transfer;
>    unsigned short inst;

Here too.

-- 
Alan Modra
Australia Development Lab, IBM


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