msg_102.c revision 1.3
11.3Srillig/* $NetBSD: msg_102.c,v 1.3 2021/12/14 18:26:39 rillig Exp $ */ 21.1Srillig# 3 "msg_102.c" 31.1Srillig 41.1Srillig// Test for message: illegal member use: %s [102] 51.1Srillig 61.3Srillig// Anonymous members are defined in C11 6.7.2.1p2. 71.3Srillig 81.3Srilligstruct bit_fields_and_bits { 91.3Srillig union { 101.3Srillig struct { 111.3Srillig unsigned bit_0:1; 121.3Srillig unsigned bit_1:1; 131.3Srillig }; 141.3Srillig unsigned bits; 151.3Srillig }; 161.3Srillig}; 171.3Srillig 181.3Srilligstatic inline _Bool 191.3Srilligeq(const struct bit_fields_and_bits *a, const struct bit_fields_and_bits *b) 201.3Srillig{ 211.3Srillig /* 221.3Srillig * TODO: Once this is fixed, enable lint in 231.3Srillig * external/mit/xorg/lib/dri.old/Makefile again. 241.3Srillig */ 251.3Srillig /* TODO: Add support for C11 anonymous struct and union members. */ 261.3Srillig /* expect+2: error: illegal member use: bits [102] */ 271.3Srillig /* expect+1: error: illegal member use: bits [102] */ 281.3Srillig return a->bits == b->bits; 291.3Srillig} 30