diff options
author | Tristan Gingold <gingold@adacore.com> | 2014-01-24 14:48:48 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-24 15:48:48 +0100 |
commit | bff2d234281c10f137b8e2a2b9957c5675506eab (patch) | |
tree | d8039c5888d3d1b7b0201d6dde6002842629ff46 /gcc/ada/gcc-interface/misc.c | |
parent | d0ef7921074e2de8f6d4f96b9973ed32e63c0060 (diff) | |
download | gcc-bff2d234281c10f137b8e2a2b9957c5675506eab.zip gcc-bff2d234281c10f137b8e2a2b9957c5675506eab.tar.gz gcc-bff2d234281c10f137b8e2a2b9957c5675506eab.tar.bz2 |
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
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; } |