(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
c11-unproto-1.c
       1  /* Test compatibility of unprototyped and prototyped function types (C2x made
       2     the case of types affected by default argument promotions compatible, before
       3     removing unprototyped functions completely).  Test affected usages are not
       4     accepted for C11.  */
       5  /* { dg-do compile } */
       6  /* { dg-options "-std=c11 -pedantic-errors" } */
       7  
       8  void f1 (); /* { dg-message "previous declaration" } */
       9  void f1 (float); /* { dg-error "conflicting types" } */
      10  /* { dg-message "default promotion" "" { target *-*-* } .-1 } */
      11  
      12  void f2 (float); /* { dg-message "previous declaration" } */
      13  void f2 (); /* { dg-error "conflicting types" } */
      14  /* { dg-message "default promotion" "" { target *-*-* } .-1 } */
      15  
      16  void f3 (); /* { dg-message "previous declaration" } */
      17  void f3 (char); /* { dg-error "conflicting types" } */
      18  /* { dg-message "default promotion" "" { target *-*-* } .-1 } */
      19  
      20  void f4 (char); /* { dg-message "previous declaration" } */
      21  void f4 (); /* { dg-error "conflicting types" } */
      22  /* { dg-message "default promotion" "" { target *-*-* } .-1 } */
      23  
      24  /* Built-in function case.  */
      25  float sqrtf (); /* { dg-warning "conflicting types for built-in function" } */