1 /* $NetBSD: msg_067.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */ 2 # 3 "msg_067.c" 3 4 // Test for message: cannot return incomplete type [67] 5 6 /* lint1-extra-flags: -X 351 */ 7 8 /* expect+1: warning: struct 'incomplete' never defined [233] */ 9 struct incomplete; 10 11 struct incomplete function_declaration(void); 12 13 struct incomplete function_definition(void)14function_definition(void) 15 /* expect+1: error: cannot return incomplete type [67] */ 16 { 17 /* expect+1: error: 'r' has incomplete type 'incomplete struct incomplete' [31] */ 18 struct incomplete r; 19 20 /* expect+1: error: cannot return incomplete type [212] */ 21 return r; 22 } 23