aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-11 12:23:50 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-11 12:23:50 +0000
commit7d5a5747fc5ffbd86d1da0e2cff9823f0446a907 (patch)
tree1a38b4f6902dc5e5cc35971539a25051202efa2e /gcc/ada/gcc-interface/misc.c
parent319e6439f592285e7d931c47285c363cca113788 (diff)
downloadgcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.zip
gcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.tar.gz
gcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.tar.bz2
re PR c/53063 (encode group options in the .opt files)
2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 53063 gcc/ * doc/options.texi (EnabledBy): Document * opts.c: Include opts.h and options.h before tm.h. (finish_options): Do not handle some sub-options here... (common_handle_option): ... instead call common_handle_option_auto here. * optc-gen.awk: Handle EnabledBy. * opth-gen.awk: Declare common_handle_option_auto. * common.opt (Wuninitialized): Use EnabledBy. Delete Init. (Wmaybe-uninitialized): Likewise. (Wunused-but-set-variable): Likewise. (Wunused-function): Likewise. (Wunused-label): Likewise. (Wunused-value): Likewise. (Wunused-variable): Likewise. * opt-read.awk: Create opt_numbers array. ada/ * gcc-interface/misc.c (gnat_parse_file): Move before ... (gnat_handle_option): ... this. Use handle_generated_option. c-family/ * c-opts.c (c_common_handle_option): Use handle_generated_option to enable sub-options. fortran/ * options.c: Include diagnostics.h instead of diagnostics-core.h. (set_Wall): Do not see warn_unused here. (gfc_handle_option): Set it here using handle_generated_option. From-SVN: r187403
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 974827a..ad15f67 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -105,6 +105,14 @@ gnat_parse_file (void)
_ada_gnat1drv ();
}
+/* Return language mask for option processing. */
+
+static unsigned int
+gnat_option_lang_mask (void)
+{
+ return CL_Ada;
+}
+
/* Decode all the language specific options that cannot be decoded by GCC.
The option decoding phase of GCC calls this routine on the flags that
are marked as Ada-specific. Return true on success or false on failure. */
@@ -119,7 +127,10 @@ gnat_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, int value,
switch (code)
{
case OPT_Wall:
- warn_unused = value;
+ handle_generated_option (&global_options, &global_options_set,
+ OPT_Wunused, NULL, value,
+ gnat_option_lang_mask (), kind, loc,
+ handlers, global_dc);
warn_uninitialized = value;
warn_maybe_uninitialized = value;
break;
@@ -145,14 +156,6 @@ gnat_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, int value,
return true;
}
-/* Return language mask for option processing. */
-
-static unsigned int
-gnat_option_lang_mask (void)
-{
- return CL_Ada;
-}
-
/* Initialize options structure OPTS. */
static void