aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/diagnostic/bad-binary-ops-no-highlight-colors.C
blob: 5b1b65a7293919fa4f18b3574e50e860a034cfdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Verify that -fno-diagnostics-show-highlight-colors works.  */
/* { dg-options "-fdiagnostics-show-caret -fdiagnostics-color=always -fno-diagnostics-show-highlight-colors" } */

struct s {};
struct t {};
typedef struct s S;
typedef struct t T;

extern S callee_4a (void);
extern T callee_4b (void);

int test_4 (void)
{
  return callee_4a () + callee_4b ();

  /* { dg-begin-multiline-output "" }
   error: no match for 'operator+' (operand types are 'S' {aka 's'} and 'T' {aka 't'})
     { dg-end-multiline-output "" } */

  /* { dg-begin-multiline-output "" }
   return callee_4a () + callee_4b ();
          ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
                    |              |
                    S {aka s}      T {aka t}
     { dg-end-multiline-output "" } */

  /* { dg-prune-output "In function" } */
  /* { dg-prune-output "bad-binary-ops-no-highlight-colors.C" } */
}