diff options
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index fc74be2..0272050 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -224,10 +224,12 @@ gnat_init_options (unsigned int decoded_options_count, #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. @@ -258,6 +260,12 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) 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; } |