Home | History | Annotate | Line # | Download | only in lint1
msg_067.c revision 1.5
      1 /*	$NetBSD: msg_067.c,v 1.5 2022/06/11 11:52:13 rillig Exp $	*/
      2 # 3 "msg_067.c"
      3 
      4 // Test for message: cannot return incomplete type [67]
      5 
      6 /* expect+1: warning: struct 'incomplete' never defined [233] */
      7 struct incomplete;
      8 
      9 struct incomplete function_declaration(void);
     10 
     11 struct incomplete
     12 function_definition(void)
     13 /* expect+1: error: cannot return incomplete type [67] */
     14 {
     15 	/* expect+1: error: 'r' has incomplete type 'incomplete struct incomplete' [31] */
     16 	struct incomplete r;
     17 
     18 	/* expect+1: error: cannot return incomplete type [212] */
     19 	return r;
     20 }
     21