Debian Codegraph @

gcc/testsuite/gcc.dg/bad-binary-ops-no-highlight-colors.c

raw
1 /* Verify that -fno-diagnostics-show-highlight-colors works. */
2 /* { dg-options "-fdiagnostics-show-caret -fdiagnostics-color=always -fno-diagnostics-show-highlight-colors" } */
3
4 struct s {};
5 struct t {};
6 typedef struct s S;
7 typedef struct t T;
8
9 extern S callee_4a (void);
10 extern T callee_4b (void);
11
12 int test_4 (void)
13 {
14 return callee_4a () + callee_4b ();
15
16 /* { dg-begin-multiline-output "" }
17  error: invalid operands to binary + (have 'S' {aka 'struct s'} and 'T' {aka 'struct t'})
18 { dg-end-multiline-output "" } */
19
20 /* { dg-begin-multiline-output "" }
21 return callee_4a () + callee_4b ();
22 ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
23 | |
24 | T {aka struct t}
25 S {aka struct s}
26 { dg-end-multiline-output "" } */
27
28 /* { dg-prune-output "In function" } */
29 /* { dg-prune-output "bad-binary-ops-no-highlight-colors.c" } */
30 }