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: [RFC PATCH, binutils, ARM 5/9] Allow veneers to claim veneered symbols


Hi Thomas.

> @@ -2632,8 +2632,9 @@ enum elf32_arm_stub_type
>   {
>     arm_stub_none,
>     DEF_STUBS
> +  max_stub_type,
>     /* Note the first a8_veneer type.  */
> -  arm_stub_a8_veneer_lwm = arm_stub_a8_veneer_b_cond
> +  arm_stub_a8_veneer_lwm = arm_stub_a8_veneer_b_cond,
>   };

Why do you need the extra comma at the end of the enum ?

I don't like that "max_stub_type" is not actually the maximum possible
value for an elf32_arn_stub_type enum.  The name is misleading.  Maybe
you could use something like "last_non_veneer_stub".

> +  switch (stub_type)
> +    {
> +    default:
> +      return FALSE;
> +    }
> +
> +  abort ();  /* Should be unreachable.  */
> +}

I presume that your intention is to extend the switch table later on,
but there is no need for that now.  Just use:

   return FALSE;


Cheers
  Nick


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