Commit bff2d234 by Tristan Gingold Committed by Arnaud Charlet

misc.c (flag_short_enums): Declare.

2014-01-24  Tristan Gingold  <gingold@adacore.com>
        
	* gcc-interface/misc.c (flag_short_enums): Declare.
	(gnat_post_options): Set it.

From-SVN: r207037
parent d0ef7921
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
2014-01-24 Tristan Gingold <gingold@adacore.com> 2014-01-24 Tristan Gingold <gingold@adacore.com>
* back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target. * 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> 2014-01-24 Vincent Celier <celier@adacore.com>
......
...@@ -224,10 +224,12 @@ gnat_init_options (unsigned int decoded_options_count, ...@@ -224,10 +224,12 @@ gnat_init_options (unsigned int decoded_options_count,
#undef optimize #undef optimize
#undef optimize_size #undef optimize_size
#undef flag_compare_debug #undef flag_compare_debug
#undef flag_short_enums
#undef flag_stack_check #undef flag_stack_check
int optimize; int optimize;
int optimize_size; int optimize_size;
int flag_compare_debug; int flag_compare_debug;
int flag_short_enums;
enum stack_check_type flag_stack_check = NO_STACK_CHECK; enum stack_check_type flag_stack_check = NO_STACK_CHECK;
/* Settings adjustments after switches processing by the back-end. /* Settings adjustments after switches processing by the back-end.
...@@ -258,6 +260,12 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) ...@@ -258,6 +260,12 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
flag_compare_debug = global_options.x_flag_compare_debug; flag_compare_debug = global_options.x_flag_compare_debug;
flag_stack_check = global_options.x_flag_stack_check; 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; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment