| 1 |
// { dg-do compile } |
| 2 |
// { dg-additional-options {-fdiagnostics-show-caret -save-temps} } |
| 3 |
// comment save-temps causes us to compile preprocessed output |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
// Intentional blank lines |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#include "missing-std-include-10.h" |
| 20 |
// HERE |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
// Intentional blank lines |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
int main () |
| 38 |
{ |
| 39 |
return strcmp ("", ""); |
| 40 |
} |
| 41 |
// { dg-additional-files "missing-std-include-10.h" } |
| 42 |
// { dg-regexp {[^\n]*: error: 'strcmp' was not declared in this scope\n *return strcmp [^\n]*;\n *\^~*\n} } |
| 43 |
// { dg-regexp {[^\n]* note: 'strcmp' is defined in header[^\n]*\n #include "missing-std-include-10.h"\n\+#include <cstring>\n // HERE\n} } |