diff mbox

[ARM] fix arm bootstrap

Message ID 5555AE49.3030301@arm.com
State New
Headers show

Commit Message

Ramana Radhakrishnan May 15, 2015, 8:28 a.m. UTC
On 15/05/15 07:41, Kugan wrote:
> Hi Richard,
>
> r223090 seem to miss a parenthesis and seem to be causing:
>
>                   from ../../widen/gcc/fold-const.c:46:
> ../../widen/gcc/fold-const.c: In function 'tree_node*
> fold_range_test(location_t, tree_code, tree, tree, tree)':
> ../../widen/gcc/config/arm/arm.h:2068:4: error: enumeral and
> non-enumeral type in conditional expression [-Werror=extra]
>      ? (TARGET_THUMB ? false : true)     \
>      ^

Looks like a missing cast - A cast appears to let me continue with the 
build (fold-const.o builds without any warnings).

Will apply it if the bootstrap finishes ok with an appropriate changelog.

regards
Ramana


* config/arm/arm.h (LOGICAL_OP_SHORT_CIRCUIT): Add static casts.


> ../../widen/gcc/fold-const.c:5234:12: note: in expansion of macro
> 'LOGICAL_OP_NON_SHORT_CIRCUIT'
>     else if (LOGICAL_OP_NON_SHORT_CIRCUIT
>              ^
> ../../widen/gcc/fold-const.c: In function 'tree_node*
> fold_truth_andor(location_t, tree_code, tree, tree, tree, tree, tree)':
> ../../widen/gcc/config/arm/arm.h:2068:4: error: enumeral and
> non-enumeral type in conditional expression [-Werror=extra]
>      ? (TARGET_THUMB ? false : true)     \
>      ^
> ../../widen/gcc/fold-const.c:8431:7: note: in expansion of macro
> 'LOGICAL_OP_NON_SHORT_CIRCUIT'
>     if (LOGICAL_OP_NON_SHORT_CIRCUIT
>
>
> Regression testing for arm-none-linux-gnueab is ongoing.
> Is this OK for trunk if no regression?
>
> Thanks,
> Kugan
>
> gcc/ChangeLog:
>
> 2015-05-15  Kugan Vivekanandarajah  <kuganv@linaro.org>
>
> 	* config/arm/arm.h (enum arm_auto_incmodes): Add parenthesis.
>
diff mbox

Patch

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 8574388..a58a7b1 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2060,8 +2060,8 @@  enum arm_auto_incmodes
 #define LOGICAL_OP_NON_SHORT_CIRCUIT					\
   ((optimize_size)							\
    ? (TARGET_THUMB ? false : true)					\
-   : TARGET_THUMB ? current_tune->logical_op_non_short_circuit_thumb	\
-   : current_tune->logical_op_non_short_circuit_arm)
+   : TARGET_THUMB ? static_cast<bool> (current_tune->logical_op_non_short_circuit_thumb) \
+   : static_cast<bool> (current_tune->logical_op_non_short_circuit_arm))
 
 
 /* Position Independent Code.  */