aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
authorDominik Vogt <vogt@linux.vnet.ibm.com>2015-07-28 05:51:01 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2015-07-28 05:51:01 +0000
commit85d91a6bd4327466242568b4ccb1269d39e2fc3c (patch)
tree1ef7b9ffc5bf028c1d415f83db1aedba306b10bb /gcc/opts-common.c
parentd5e9bac57fe9afb37c83748b8bde9831f8a589e0 (diff)
downloadgcc-85d91a6bd4327466242568b4ccb1269d39e2fc3c.zip
gcc-85d91a6bd4327466242568b4ccb1269d39e2fc3c.tar.gz
gcc-85d91a6bd4327466242568b4ccb1269d39e2fc3c.tar.bz2
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
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c2
1 files changed, 2 insertions, 0 deletions
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] = ' ';