35 lines · plain
1#import <Foundation/Foundation.h>2 3typedef struct {4 BOOL fieldOne : 1;5 BOOL fieldTwo : 1;6 BOOL fieldThree : 1;7 BOOL fieldFour : 1;8 BOOL fieldFive : 1;9} BoolBitFields;10 11int main (int argc, const char * argv[])12{13 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];14 15 BOOL yes = YES;16 BOOL no = NO;17 BOOL unset = 12;18 19 BOOL &yes_ref = yes;20 BOOL &no_ref = no;21 BOOL &unset_ref = unset;22 23 BOOL* yes_ptr = &yes;24 BOOL* no_ptr = &no;25 BOOL* unset_ptr = &unset;26 27 BoolBitFields myField = {0};28 myField.fieldTwo = YES;29 myField.fieldFive = YES;30 31 [pool drain];// Set break point at this line.32 return 0;33}34 35