Allow targets to define the default for the short enums option. gcc/
* config/arm/arm.c: (ARM_DEFAULT_SHORT_ENUMS): Provide default definition. * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS) Define. --- gcc/config/arm/arm.c | 6 +++++- gcc/config/arm/rtems.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index b24143e..33d3834 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -26547,11 +26547,15 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, } /* AAPCS based ABIs use short enums by default. */ +#ifndef ARM_DEFAULT_SHORT_ENUMS +#define ARM_DEFAULT_SHORT_ENUMS \ + (TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX) +#endif static bool arm_default_short_enums (void) { - return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX; + return ARM_DEFAULT_SHORT_ENUMS; } diff --git a/gcc/config/arm/rtems.h b/gcc/config/arm/rtems.h index 53cd987..b34bbe8 100644 --- a/gcc/config/arm/rtems.h +++ b/gcc/config/arm/rtems.h @@ -27,3 +27,5 @@ builtin_assert ("system=rtems"); \ TARGET_BPABI_CPP_BUILTINS(); \ } while (0) + +#define ARM_DEFAULT_SHORT_ENUMS false -- 1.8.4.5