Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/missing-header-fixit-4.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Example of a fix-it hint that adds a #include directive, | |
2 adding them after a pre-existing #include directive. */ | |
3 #include "empty.h" | |
4 int the_next_line; | |
5 | |
6 /* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers" } */ | |
7 | |
8 void test (int i, int j) | |
9 { | |
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); | |
15 | ^~~~~~ | |
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 "" } */ | |
23 } |