| 1 |
/* Verify that colorization affects both text within diagnostic messages |
| 2 |
and underlined ranges of quoted source, and that the types we use |
| 3 |
match up between them. |
| 4 |
Also implicitly verify that -fdiagnostics-show-highlight-colors is |
| 5 |
on by default. */ |
| 6 |
|
| 7 |
/* { dg-options "-fdiagnostics-show-caret -fdiagnostics-color=always" } */ |
| 8 |
|
| 9 |
struct s {}; |
| 10 |
struct t {}; |
| 11 |
typedef struct s S; |
| 12 |
typedef struct t T; |
| 13 |
|
| 14 |
extern S callee_4a (void); |
| 15 |
extern T callee_4b (void); |
| 16 |
|
| 17 |
int test_4 (void) |
| 18 |
{ |
| 19 |
return callee_4a () + callee_4b (); |
| 20 |
|
| 21 |
/* { dg-begin-multiline-output "" } |
| 22 |
[m[K [01;31m[Kerror: [m[Kno match for '[01m[Koperator+[m[K' (operand types are '[01m[K[01;32m[KS[m[K' {aka '[01m[K[01;32m[Ks[m[K'}[m[K and '[01m[K[01;34m[KT[m[K' {aka '[01m[K[01;34m[Kt[m[K'}[m[K) |
| 23 |
{ dg-end-multiline-output "" } */ |
| 24 |
|
| 25 |
/* { dg-begin-multiline-output "" } |
| 26 |
return [01;32m[Kc[m[K[01;32m[Ka[m[K[01;32m[Kl[m[K[01;32m[Kl[m[K[01;32m[Ke[m[K[01;32m[Ke[m[K[01;32m[K_[m[K[01;32m[K4[m[K[01;32m[Ka[m[K[01;32m[K [m[K[01;32m[K([m[K[01;32m[K)[m[K [01;31m[K+[m[K [01;34m[Kc[m[K[01;34m[Ka[m[K[01;34m[Kl[m[K[01;34m[Kl[m[K[01;34m[Ke[m[K[01;34m[Ke[m[K[01;34m[K_[m[K[01;34m[K4[m[K[01;34m[Kb[m[K[01;34m[K [m[K[01;34m[K([m[K[01;34m[K)[m[K; |
| 27 |
[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K[01;32m[K~[m[K [01;31m[K^[m[K [01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K[01;34m[K~[m[K |
| 28 |
[01;32m[K|[m[K [01;34m[K|[m[K |
| 29 |
[01;32m[KS {aka s}[m[K [01;34m[KT {aka t}[m[K |
| 30 |
{ dg-end-multiline-output "" } */ |
| 31 |
|
| 32 |
/* { dg-prune-output "In function" } */ |
| 33 |
/* { dg-prune-output "bad-binary-ops-highlight-colors.C" } */ |
| 34 |
} |