This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Ping Re: [PATCH] go-lang.c: remove a redundant cast


On Fri, 2016-10-07 at 15:12 -0400, David Malcolm wrote:
> Amongst many other changes, r146451 added this cast:
> 
>  -#define GET_MODE_CLASS(MODE)  mode_class[MODE]
>  +#define GET_MODE_CLASS(MODE)  ((enum mode_class) mode_class[MODE])
> 
> making a cast in go-lang.c redundant; remove it.
> 
> Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
> 
> OK for trunk?
> 
> gcc/go/ChangeLog:
> 	> * go-lang.c (go_langhook_type_for_mode): Remove redundant cast
> 	> from result of GET_MODE_CLASS.  Minor formatting fixes.
> ---
>  gcc/go/go-lang.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
> index 88667e0..acf1fb7 100644
> --- a/gcc/go/go-lang.c
> +++ b/gcc/go/go-lang.c
> @@ -370,10 +370,9 @@ go_langhook_type_for_mode (machine_mode mode, int unsignedp)
>        return NULL_TREE;
>      }
>  
> -  // FIXME: This static_cast should be in machmode.h.
> -  enum mode_class mc = static_cast(GET_MODE_CLASS(mode));
> +  enum mode_class mc = GET_MODE_CLASS (mode);
>    if (mc == MODE_INT)
> -    return go_langhook_type_for_size(GET_MODE_BITSIZE(mode), unsignedp);
> +    return go_langhook_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
>    else if (mc == MODE_FLOAT)
>      {
>        switch (GET_MODE_BITSIZE (mode))

Ping.


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