summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/c-compat.exp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-26 06:55:56 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-26 06:55:56 +0000
commit71eeb8d395362158ffe9efbc2a7efbe3c4268db5 (patch)
tree51e30ba36c159ac77b30129857b8d14e386bd6bd /gcc/testsuite/lib/c-compat.exp
parent2cafe21106dc81d9ec203120ef94e4e35527eaa4 (diff)
downloadgcc-71eeb8d395362158ffe9efbc2a7efbe3c4268db5.tar.gz
* Makefile.in (toplev.o): Depend on diagnostic-color.h.
* diagnostic-color.c (should_colorize): Remove _WIN32 version. (colorize_init): Add argument to _WIN32 version. * toplev.c: Include diagnostic-color.h. (process_options): Default to -fdiagnostics-color=auto if GCC_COLORS env var is in the environment. * common.opt (fdiagnostics-color=): Add Var and Init. * doc/invoke.texi (-fdiagnostics-color=): Document that if GCC_COLORS env var is in the environment, the default is auto rather than never. * lib/prune.exp: Add -fdiagnostics-color=never to TEST_ALWAYS_FLAGS. * lib/c-compat.exp (compat-use-alt-compiler, compat_setup_dfp): Handle -fdiagnostics-color=never option similarly to -fno-diagnostics-show-caret option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/c-compat.exp')
-rw-r--r--gcc/testsuite/lib/c-compat.exp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/c-compat.exp b/gcc/testsuite/lib/c-compat.exp
index 58eaf4d64ad..b42545dfaa4 100644
--- a/gcc/testsuite/lib/c-compat.exp
+++ b/gcc/testsuite/lib/c-compat.exp
@@ -34,7 +34,7 @@ load_lib target-supports.exp
#
proc compat-use-alt-compiler { } {
global GCC_UNDER_TEST ALT_CC_UNDER_TEST
- global compat_same_alt compat_alt_caret
+ global compat_same_alt compat_alt_caret compat_alt_color
global TEST_ALWAYS_FLAGS
# We don't need to do this if the alternate compiler is actually
@@ -44,6 +44,9 @@ proc compat-use-alt-compiler { } {
if { $compat_alt_caret == 0 } then {
regsub -- "-fno-diagnostics-show-caret" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
}
+ if { $compat_alt_color == 0 } then {
+ regsub -- "-fdiagnostics-color=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+ }
}
}
@@ -70,9 +73,11 @@ proc compat_setup_dfp { } {
global compat_same_alt
global compat_have_dfp
global compat_alt_caret
+ global compat_alt_color
global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
set compat_alt_caret 0
+ set compat_alt_color 0
set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
verbose "compat_setup_dfp: $compat_use_alt $compat_same_alt" 2
@@ -88,6 +93,10 @@ proc compat_setup_dfp { } {
int dummy; } "-fno-diagnostics-show-caret"] != 0 } {
set compat_alt_caret 1
}
+ if { [check_no_compiler_messages_nocache compat_alt_has_color object {
+ int dummy; } "-fdiagnostics-color=never"] != 0 } {
+ set compat_alt_color 1
+ }
compat-use-tst-compiler
}