diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/opts-common.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55897c7..90b4932 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-28 Dominik Vogt <vogt@linux.vnet.ibm.com> + + * opts-common.c (read_cmdline_option): List DriverOnly enum values + as valid only in the error message of the driver, not in the + messages of the language compilers. + 2015-07-27 Tom de Vries <tom@codesourcery.com> * tree-parloops.c (gather_scalar_reductions): Simplify function diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 8e51974..3bcbaf1 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -1079,6 +1079,8 @@ read_cmdline_option (struct gcc_options *opts, p = s; for (i = 0; e->values[i].arg != NULL; i++) { + if (!enum_arg_ok_for_language (&e->values[i], lang_mask)) + continue; size_t arglen = strlen (e->values[i].arg); memcpy (p, e->values[i].arg, arglen); p[arglen] = ' '; |