(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
spellcheck-identifiers-3.c
       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  
       6  void fn1abcd (void);
       7  
       8  void
       9  test_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  
      19  void fn2efgh (void);
      20  void (*fn2efhg) (void);
      21  
      22  void
      23  test_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  
      33  void fn3ijkl (void);
      34  typedef int fn3ijlk;
      35  
      36  void
      37  test_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  }