1 /* $NetBSD: msg_319.c,v 1.6 2023/07/21 06:02:07 rillig Exp $ */ 2 # 3 "msg_319.c" 3 4 /* Test for message: compound literals are a C99/GCC extension [319] */ 5 6 /* lint1-flags: -sw -X 351 */ 7 8 /* expect+2: error: compound literals are a C99/GCC extension [319] */ 9 /* expect+1: error: non-constant initializer [177] */ 10 int number = (int) { 3 }; 11 12 struct point { 13 int x; 14 int y; 15 } point = (struct point) { 16 3, 17 4, 18 }; 19 /* expect-1: error: compound literals are a C99/GCC extension [319] */ 20 /* expect-2: error: {}-enclosed or constant initializer of type 'struct point' required [181] */ 21