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