1 /* { dg-options "-fdiagnostics-show-caret" } */
3 /* Adapted from https://gcc.gnu.org/wiki/ClangDiagnosticsComparison */
10 myvec
[1]/ptr
; /* { dg-error "invalid operands to binary /" } */
12 /* TODO: ideally we'd underline "ptr" as well.
13 { dg-begin-multiline-output "" }
16 { dg-end-multiline-output "" } */
23 extern struct s
some_function (void);
24 extern struct t
some_other_function (void);
28 return (some_function ()
29 + some_other_function ()); /* { dg-error "invalid operands to binary \+" } */
31 /* { dg-begin-multiline-output "" }
32 return (some_function ()
34 + some_other_function ());
35 ^ ~~~~~~~~~~~~~~~~~~~~~~
36 { dg-end-multiline-output "" } */
39 int test_3 (struct s param_s
, struct t param_t
)
41 return param_s
+ param_t
; // { dg-error "invalid operands to binary \+" }
43 /* { dg-begin-multiline-output "" }
44 return param_s + param_t;
46 { dg-end-multiline-output "" } */
47 /* TODO: ideally we'd underline both params here. */