2014-01-24 Tristan Gingold <gingold@adacore.com>
* gcc-interface/misc.c (flag_short_enums): Declare.
(gnat_post_options): Set it.
From-SVN: r207037
2014-01-24 Tristan Gingold <gingold@adacore.com>
* back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
+ * gcc-interface/misc.c (flag_short_enums): Declare.
+ (gnat_post_options): Set it.
2014-01-24 Vincent Celier <celier@adacore.com>
#undef optimize
#undef optimize_size
#undef flag_compare_debug
+#undef flag_short_enums
#undef flag_stack_check
int optimize;
int optimize_size;
int flag_compare_debug;
+int flag_short_enums;
enum stack_check_type flag_stack_check = NO_STACK_CHECK;
/* Settings adjustments after switches processing by the back-end.
flag_compare_debug = global_options.x_flag_compare_debug;
flag_stack_check = global_options.x_flag_stack_check;
+ /* Unfortunately the post_options hook is called before setting the
+ short_enums flag. Set it now. */
+ if (global_options.x_flag_short_enums == 2)
+ global_options.x_flag_short_enums = targetm.default_short_enums ();
+ flag_short_enums = global_options.x_flag_short_enums;
+
return false;
}