This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Ping Re: [PATCH] go-lang.c: remove a redundant cast
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ian Lance Taylor <ian at airs dot com>
- Date: Fri, 21 Oct 2016 16:10:47 -0400
- Subject: Ping Re: [PATCH] go-lang.c: remove a redundant cast
- Authentication-results: sourceware.org; auth=none
- References: <1475867547-24449-1-git-send-email-dmalcolm@redhat.com>
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.