1 /* Example of a fix-it hint that adds a #include directive,
2 adding them after a pre-existing #include directive. */
6 /* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers" } */
8 void test (int i
, int j
)
10 printf ("%i of %i\n", i
, j
); /* { dg-line printf } */
11 /* { dg-warning "implicit declaration of function" "" { target *-*-* } printf } */
12 /* { dg-warning "incompatible implicit declaration" "" { target *-*-* } printf } */
13 /* { dg-begin-multiline-output "" }
14 10 | printf ("%i of %i\n", i, j);
16 { dg-end-multiline-output "" } */
17 /* { dg-message "include '<stdio.h>' or provide a declaration of 'printf'" "" { target *-*-* } 4 } */
18 /* { dg-begin-multiline-output "" }
19 3 | #include "empty.h"
20 +++ |+#include <stdio.h>
21 4 | int the_next_line;
22 { dg-end-multiline-output "" } */