(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Wbuiltin-declaration-mismatch-7.c
       1  /* PR c/86125 - missing -Wbuiltin-declaration-mismatch on a mismatched
       2     return type
       3     Verify that a declaration of vfprintf() with withe the wrong last
       4     argument triggers -Wbuiltin-declaration-mismatch even without -Wextra.
       5     { dg-do compile { target { { lp64 || ilp32 } || llp64 } } }
       6     { dg-options "-Wbuiltin-declaration-mismatch" } */
       7  
       8  struct StdioFile;
       9  
      10  typedef __SIZE_TYPE__ size_t;
      11  
      12  struct StdioFile;
      13  
      14  int fprintf (struct StdioFile*, const char*);   /* { dg-warning "conflicting types for built-in function .fprintf.; expected .int\\\(\[a-z_\]+ \\\*, const char \\\*, \.\.\.\\\)." } */
      15  
      16  int vfprintf (struct StdioFile*, const char*, ...);   /* { dg-warning "conflicting types for built-in function .vfprintf.; expected .int\\\(\[a-z_\]+ \\\*, const char \\\*, \[^\n\r,\\\)\]+\\\)." } */
      17  
      18  int fputc (char, struct StdioFile*);   /* { dg-warning "conflicting types for built-in function .fputc.; expected .int\\\(int,  void \\\*\\\)." } */
      19  
      20  unsigned long long fputs (const char*, struct StdioFile*);   /* { dg-warning "conflicting types for built-in function .fputs.; expected .int\\\(const char \\\*, \[a-z_\]+ \\\*\\\)." } */
      21  
      22  int fscanf (struct StdioFile*, const char*, size_t, ...);   /* { dg-warning "conflicting types for built-in function .fscanf.; expected .int\\\(\[a-z_\]+ \\\*, const char \\\*, \.\.\.\\\)." } */
      23  
      24  int vfscanf (struct StdioFile*, const char*, ...);   /* { dg-warning "conflicting types for built-in function .vfscanf.; expected .int\\\(\[a-z_\]+ \\\*, const char \\\*, \[^\n\r,\\\)\]+\\\)." } */
      25  
      26  size_t fwrite (const void*, size_t, size_t, struct StdioFile);    /* { dg-warning "conflicting types for built-in function .fwrite.; expected .\(long \)*unsigned int\\\(const void \\\*, \(long \)*unsigned int, *\(long \)*unsigned int, *\[a-z_\]+ \\\*\\\)." } */