msg_179.c revision 1.4
11.4Srillig/* $NetBSD: msg_179.c,v 1.4 2021/12/22 00:45:53 rillig Exp $ */ 21.1Srillig# 3 "msg_179.c" 31.1Srillig 41.1Srillig// Test for message: cannot initialize struct/union with no named member [179] 51.1Srillig 61.3Srilligstruct { 71.3Srillig unsigned int :0; 81.3Srillig} no_named_member = { 91.4Srillig /* expect-1: error: cannot initialize struct/union with no named member [179] */ 101.3Srillig /* no named member, therefore no initializer expression */ 111.3Srillig}; 121.3Srillig 131.3Srilligstruct { 141.3Srillig /* no members */ 151.3Srillig} empty = { 161.4Srillig /* expect-1: error: cannot initialize struct/union with no named member [179] */ 171.3Srillig /* no initializer expressions */ 181.3Srillig}; 191.3Srillig 201.3Srilligstruct { 211.3Srillig unsigned int: 0; 221.3Srillig} no_named_member_init = { 231.4Srillig /* expect-1: error: cannot initialize struct/union with no named member [179] */ 241.3Srillig 3, 251.3Srillig}; 26