aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-24 17:22:02 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-24 17:22:02 +0100
commitc51f5910f32421583d6b64d9681bba4c1b7d9a62 (patch)
tree1b66626688e03bff17da5a6e506a763b0ef46bc6 /gcc/ada/gcc-interface/misc.c
parentf9e2a506da8d61699611f756732f4c708f72976c (diff)
downloadgcc-c51f5910f32421583d6b64d9681bba4c1b7d9a62.zip
gcc-c51f5910f32421583d6b64d9681bba4c1b7d9a62.tar.gz
gcc-c51f5910f32421583d6b64d9681bba4c1b7d9a62.tar.bz2
[multiple changes]
2014-01-24 Eric Botcazou <ebotcazou@adacore.com> * set_targ.adb: Set Short_Enums. * gcc-interface/lang.opt (fshort-enums): New option. * gcc-interface/misc.c (gnat_handle_option): Handle it. (gnat_post_options): Do not modify the global settings. 2014-01-24 Robert Dewar <dewar@adacore.com> * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic function. (Random_Decimal_Fixed): New generic function. * s-rannum.ads: Minor comment clarifications. From-SVN: r207049
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 0272050..5f135a0 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -151,6 +151,10 @@ gnat_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, int value,
/* These are handled by the front-end. */
break;
+ case OPT_fshort_enums:
+ /* This is handled by the middle-end. */
+ break;
+
default:
gcc_unreachable ();
}
@@ -259,13 +263,14 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
optimize_size = global_options.x_optimize_size;
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;
+ /* Unfortunately the post_options hook is called before the value of
+ flag_short_enums is autodetected, if need be. Mimic the process
+ for our private flag_short_enums. */
+ if (flag_short_enums == 2)
+ flag_short_enums = targetm.default_short_enums ();
+
return false;
}