msg_179.c revision 1.5
1/*	$NetBSD: msg_179.c,v 1.5 2023/03/28 14:44:35 rillig Exp $	*/
2# 3 "msg_179.c"
3
4// Test for message: cannot initialize struct/union with no named member [179]
5
6/* lint1-extra-flags: -X 351 */
7
8struct {
9	unsigned int :0;
10} no_named_member = {
11	/* expect-1: error: cannot initialize struct/union with no named member [179] */
12	/* no named member, therefore no initializer expression */
13};
14
15struct {
16	/* no members */
17} empty = {
18	/* expect-1: error: cannot initialize struct/union with no named member [179] */
19	/* no initializer expressions */
20};
21
22struct {
23	unsigned int: 0;
24} no_named_member_init = {
25	/* expect-1: error: cannot initialize struct/union with no named member [179] */
26	3,
27};
28