(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Wbuiltin-declaration-mismatch.c
       1  /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration
       2     without prototype
       3     { dg-do compile }
       4     { dg-options "-Wall" } */
       5  
       6  typedef __SIZE_TYPE__ size_t;
       7  
       8  /* Verify that ordinary library built-ins are not diagnosed with -Wall
       9     (or by default) whether or not they take arguments (even though they
      10     should be).  */
      11  
      12  void abort ();
      13  void* memcpy ();
      14  void* memset ();
      15  size_t strlen ();
      16  
      17  /* Verify mismatches in return types are diagnosed.  */
      18  int exit ();        /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */
      19  
      20  /* Variadic built-ins are diagnosed with -Wall (they are, in fact,
      21     diagnosed by default).  */
      22  int printf ();      /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */
      23  int sprintf ();     /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */