1  /* Test diagnostics for calling function returning qualified void or
       2     other incomplete type other than void.  PR 35210.  */
       3  /* { dg-do compile } */
       4  /* { dg-options "-std=gnu99 -pedantic-errors" } */
       5  
       6  const void f_cv (void);
       7  struct s f_s (void);
       8  void f_v (void);
       9  
      10  void g1 (void) { f_cv (); } /* { dg-error "qualified void" } */
      11  void g2 (void) { f_s (); } /* { dg-error "invalid use of undefined type" } */
      12  void g3 (void) { ((const void (*) (void)) f_v) (); } /* { dg-error "qualified void" } */
      13  /* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } .-1 } */
      14  void g4 (void) { ((struct s (*) (void)) f_v) (), (void) 0; } /* { dg-error "invalid use of undefined type" } */
      15  /* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } .-1 } */