aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-09-30 18:44:28 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-09-30 18:44:28 +0100
commit51be162e8ebb3b173c7f93c7719a7bc6192cbc42 (patch)
treeebba6265eb012de6f108537e05798e2c2f24c66f /gcc/ada/gcc-interface/misc.c
parent92902b1bafff14a118ef08dc323dfdc12b2a63ae (diff)
downloadgcc-51be162e8ebb3b173c7f93c7719a7bc6192cbc42.zip
gcc-51be162e8ebb3b173c7f93c7719a7bc6192cbc42.tar.gz
gcc-51be162e8ebb3b173c7f93c7719a7bc6192cbc42.tar.bz2
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
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 1819977..a991fba 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -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;
}