]> git.ipfire.org Git - thirdparty/gcc.git/commit
fdiagnostics-color=never does not disable color for some diagnostics
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Sep 2015 16:37:43 +0000 (16:37 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Sep 2015 16:37:43 +0000 (16:37 +0000)
commit1b3e7760f44a8b21d1407239b0479aafcb860338
tree65b1cf01a9ae795a5ecb148e8eac6ed626108fc6
parent1d46fab973921b7d944c6957758f1feb2986d982
fdiagnostics-color=never does not disable color for some diagnostics

Actually, I was trying to reject non-warning options as argument to
-Werror=. However, the new test fails because -fdiagnostics-color=never is
always placed by the driver after the warning options when calling the compiler
proper. This patch prunes all -fdiagnostics-color from the command-line but the
last one, which is moved to the first position.

gcc/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* opts-common.c (prune_options): Discard all -fdiagnostics-color
but the last one, which is moved to the front to be processed
first.
* opts.c (enable_warning_as_error): Reject options that do not
control warnings.

gcc/testsuite/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* gcc.dg/Werror-13.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228094 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/opts-common.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Werror-13.c [new file with mode: 0644]