]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/spellcheck-identifiers-3.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / spellcheck-identifiers-3.c
CommitLineData
ddbbcb19
JJ
1/* PR c/71858 */
2/* Only consider function names, function pointers and macros for implicit function declarations. */
3/* { dg-do compile } */
4/* { dg-options "-Wimplicit-function-declaration -fdiagnostics-show-caret" } */
5
6void fn1abcd (void);
7
8void
9test_1 (int fn1bacd)
10{
11 fn1badc (); /* { dg-warning "3: implicit declaration of function .fn1badc.; did you mean .fn1abcd.?" } */
12 /* { dg-begin-multiline-output "" }
13 fn1badc ();
14 ^~~~~~~
15 fn1abcd
16 { dg-end-multiline-output "" } */
17}
18
19void fn2efgh (void);
20void (*fn2efhg) (void);
21
22void
23test_2 (void)
24{
25 fn2fehg (); /* { dg-warning "3: implicit declaration of function .fn2fehg.; did you mean .fn2efhg.?" } */
26 /* { dg-begin-multiline-output "" }
27 fn2fehg ();
28 ^~~~~~~
29 fn2efhg
30 { dg-end-multiline-output "" } */
31}
32
33void fn3ijkl (void);
34typedef int fn3ijlk;
35
36void
37test_3 (void)
38{
39 fn3jilk (); /* { dg-warning "3: implicit declaration of function .fn3jilk.; did you mean .fn3ijkl.?" } */
40 /* { dg-begin-multiline-output "" }
41 fn3jilk ();
42 ^~~~~~~
43 fn3ijkl
44 { dg-end-multiline-output "" } */
45}