PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / spellcheck-identifiers-2.c
blobad6e9d3191d43aa96b2b53517237de973785782d
1 /* PR c/71858 */
2 /* Make sure anticipated builtins are not considered before they are declared. */
3 /* { dg-do compile } */
4 /* { dg-options "-Wimplicit-function-declaration -fdiagnostics-show-caret" } */
6 int sscafn (const char *, const char *, ...);
8 int
9 test_1 (const char *p)
11 int i;
12 return ssacnf (p, "%d", &i); /* { dg-warning "10: implicit declaration of function .ssacnf.; did you mean .sscafn.?" } */
13 /* { dg-begin-multiline-output "" }
14 return ssacnf (p, "%d", &i);
15 ^~~~~~
16 sscafn
17 { dg-end-multiline-output "" } */
20 int scafn (const char *, ...);
21 int scanf (const char *, ...);
23 int
24 test_2 (void)
26 int i;
27 return sacnf ("%d", &i); /* { dg-warning "10: implicit declaration of function .sacnf.; did you mean .scanf.?" } */
28 /* { dg-begin-multiline-output "" }
29 return sacnf ("%d", &i);
30 ^~~~~
31 scanf
32 { dg-end-multiline-output "" } */