public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS
@ 2017-04-03 11:32 Sebastian Huber
  2017-04-04  7:43 ` Bernhard Reutner-Fischer
  2017-04-04  9:01 ` Ramana Radhakrishnan
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastian Huber @ 2017-04-03 11:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: devel, Sebastian Huber

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-04-04 10:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 11:32 [PATCH] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS Sebastian Huber
2017-04-04  7:43 ` Bernhard Reutner-Fischer
2017-04-04  7:48   ` Sebastian Huber
2017-04-04  8:54   ` Ramana Radhakrishnan
2017-04-04  9:01 ` Ramana Radhakrishnan
2017-04-04  9:07   ` Sebastian Huber
2017-04-04 10:41     ` Ramana Radhakrishnan
2017-04-04 10:50       ` Sebastian Huber
2017-04-04 10:52         ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).