misc.c (optimize, [...]): Undefine as macros and define as variables.

* gcc-interface/misc.c (optimize, optimize_size): Undefine as
	macros and define as variables.
	(gnat_post_options): Set optimize and optimize_size variables.

From-SVN: r164755
This commit is contained in:
Joseph Myers 2010-09-30 18:44:28 +01:00 committed by Joseph Myers
parent 92902b1baf
commit 51be162e8e
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-09-30 Joseph Myers <joseph@codesourcery.com>
* gcc-interface/misc.c (optimize, optimize_size): Undefine as
macros and define as variables.
(gnat_post_options): Set optimize and optimize_size variables.
2010-09-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* g-socket.adb: Move pragma to disable warnings in case

View File

@ -303,6 +303,13 @@ gnat_init_options (unsigned int decoded_options_count,
flag_zero_initialized_in_bss = 0;
}
/* Ada code requires variables for these settings rather than elements
of the global_options structure. */
#undef optimize
#undef optimize_size
int optimize;
int optimize_size;
/* Post-switch processing. */
static bool
@ -334,6 +341,9 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
if (write_symbols == DWARF2_DEBUG)
use_gnu_debug_info_extensions = gnat_dwarf_extensions > 0;
optimize = global_options.x_optimize;
optimize_size = global_options.x_optimize_size;
return false;
}