1 #import <objc/NSObject.h>
4 unsigned char fieldOne : 1;
5 unsigned char fieldTwo : 1;
6 unsigned char fieldThree : 1;
7 unsigned char fieldFour : 1;
8 unsigned char fieldFive : 1;
11 @interface HasBitfield : NSObject {
20 @implementation HasBitfield
29 @interface ContainsAHasBitfield : NSObject {
36 @implementation ContainsAHasBitfield
39 hb = [[HasBitfield alloc] init];
45 @interface HasBitfield2 : NSObject {
55 @implementation HasBitfield2
57 return (self = [super init]);
61 int main(int argc, const char * argv[]) {
62 ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init];
63 HasBitfield2 *hb2 = [[HasBitfield2 alloc] init];
70 UCBitFields myField = {0};
72 myField.fieldFive = 1;
74 return 0; // break here