From 064263c11dcac67efa859c8b1896f0a18f5c38dc Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Tue, 30 May 2017 14:29:55 +0000 Subject: [PATCH] Fix ARM bootstrap failure due to an odd warning: /src/gcc/gcc/config/arm/arm-builtins.c: In function 'rtx_def* arm_expand_builtin(tree, rtx, rtx, machine_mode, int)': /src/gcc/gcc/config/arm/arm-builtins.c:3056:46: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] if (d->code == (const enum arm_builtins) fcode) ^~~~~ Avoid the warning by removing const, and bootstrap is OK again. Committed as trivial patch. gcc/ * config/arm/arm-builtins.c (arm_expand_builtin): Remove const. From-SVN: r248686 --- gcc/ChangeLog | 4 ++++ gcc/config/arm/arm-builtins.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8598574542c..2db6af3639b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-30 Wilco Dijkstra + + * config/arm/arm-builtins.c (arm_expand_builtin): Remove const. + 2017-05-30 Richard Biener * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index deebb59f6a6..a0569ed10c5 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -3053,15 +3053,15 @@ arm_expand_builtin (tree exp, } for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++) - if (d->code == (const enum arm_builtins) fcode) + if (d->code == (enum arm_builtins) fcode) return arm_expand_binop_builtin (d->icode, exp, target); for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++) - if (d->code == (const enum arm_builtins) fcode) + if (d->code == (enum arm_builtins) fcode) return arm_expand_unop_builtin (d->icode, exp, target, 0); for (i = 0, d = bdesc_3arg; i < ARRAY_SIZE (bdesc_3arg); i++, d++) - if (d->code == (const enum arm_builtins) fcode) + if (d->code == (enum arm_builtins) fcode) return arm_expand_ternop_builtin (d->icode, exp, target); /* @@@ Should really do something sensible here. */ -- 2.30.2