]> gcc.gnu.org Git - gcc.git/commitdiff
Honour DriverOnly for enum values in error messages
authorDominik Vogt <vogt@linux.vnet.ibm.com>
Tue, 28 Jul 2015 05:51:01 +0000 (05:51 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Tue, 28 Jul 2015 05:51:01 +0000 (05:51 +0000)
/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

gcc/ChangeLog
gcc/opts-common.c

index 55897c75a7b477c285ddb45f519417dbd0915a6f..90b4932a4f6f8dae3a539766cf080757796cc1c0 100644 (file)
@@ -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
index 8e519742ba7e178103ccaf3bd96c86d6245e6731..3bcbaf18b2273ab3c74dd998c3a31a364585a8b0 100644 (file)
@@ -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] = ' ';
This page took 0.121399 seconds and 5 git commands to generate.