diff mbox

make -fstrict-volatile-bitfields the default for m32c, rx, sh, h8

Message ID 201007100000.o6A009KB000411@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie July 10, 2010, midnight UTC
Like this?

Comments

Nathan Froyd July 12, 2010, 1:38 p.m. UTC | #1
On Fri, Jul 09, 2010 at 08:00:09PM -0400, DJ Delorie wrote:
> Like this?
>
> +#undef  TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE			rx_option_override

Yup, that's great, thank you!

-Nathan
diff mbox

Patch

Index: rx.c
===================================================================
--- rx.c	(revision 162014)
+++ rx.c	(working copy)
@@ -2187,12 +2187,20 @@  rx_set_optimization_options (void)
 
       if (saved_allow_rx_fpu != ALLOW_RX_FPU_INSNS)
 	error ("Changing the FPU insns/math optimizations pairing is not supported");
     }
 }
 
+static void
+rx_option_override (void)
+{
+  /* This target defaults to strict volatile bitfields.  */
+  if (flag_strict_volatile_bitfields < 0)
+    flag_strict_volatile_bitfields = 1;
+}
+
 
 static bool
 rx_allocate_stack_slots_for_args (void)
 {
   /* Naked functions should not allocate stack slots for arguments.  */
   return ! is_naked_func (NULL_TREE);
@@ -2775,9 +2783,12 @@  rx_memory_move_cost (enum machine_mode m
 #undef  TARGET_CC_MODES_COMPATIBLE
 #define TARGET_CC_MODES_COMPATIBLE		rx_cc_modes_compatible
 
 #undef  TARGET_MEMORY_MOVE_COST
 #define TARGET_MEMORY_MOVE_COST			rx_memory_move_cost
 
+#undef  TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE			rx_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* #include "gt-rx.h" */