From: Dominik Vogt Date: Tue, 28 Jul 2015 05:51:01 +0000 (+0000) Subject: Honour DriverOnly for enum values in error messages X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85d91a6bd4327466242568b4ccb1269d39e2fc3c;p=gcc.git Honour DriverOnly for enum values in error messages /gcc/ChangeLog * 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. From-SVN: r226297 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55897c75a7b..90b4932a4f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-28 Dominik Vogt + + * 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 * tree-parloops.c (gather_scalar_reductions): Simplify function diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 8e519742ba7..3bcbaf18b22 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] = ' ';