diagnostics: add minimum width to left margin for line numbers
[official-gcc.git] / gcc / testsuite / gcc.dg / missing-header-fixit-3.c
blobdd53bf65d3c86dc9531e8a55e6148ec04f5016d4
1 /* Example of a fix-it hint that adds a #include directive,
2 adding them to the top of the file, given that there is no
3 pre-existing #include. */
5 /* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers" } */
7 void test (int i, int j)
9 printf ("%i of %i\n", i, j); /* { dg-warning "implicit declaration" } */
10 /* { dg-message "include '<stdio.h>' or provide a declaration of 'printf'" "" { target *-*-* } 1 } */
11 #if 0
12 /* { dg-begin-multiline-output "" }
13 9 | printf ("%i of %i\n", i, j);
14 | ^~~~~~
15 { dg-end-multiline-output "" } */
16 /* { dg-begin-multiline-output "" }
17 +++ |+#include <stdio.h>
18 1 | /* Example of a fix-it hint that adds a #include directive,
19 { dg-end-multiline-output "" } */
20 #endif