Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: another compiler bug, or do I overlook something?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another compiler bug, or do I overlook something?



On Oct 4, 2008, at 4:10 PM, Ondřej Čada wrote:
140 /tmp> <q.m
#import <Cocoa/Cocoa.h>
@interface X:NSObject
@property(assign) id delegate;
@end
static X *x=nil;
void fnc() {
[(x=(X*)[[X alloc] init]).delegate class];
}
141 /tmp> cc -c q.m -fobjc-gc-only
q.m: In function 'fnc':
q.m:7: error: request for member 'delegate' in something not a structure or union
142 /tmp>

I think it must be a bug, since it compiles fine if you split fnc() into two lines and do the assignment separately. And surely it shouldn't compile differently in the objc-gc-only case.


--Andy


_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >another compiler bug, or do I overlook something? (From: Ondřej Čada <email@hidden>)
 >Re: another compiler bug, or do I overlook something? (From: Ladd Van Tol <email@hidden>)
 >Re: another compiler bug, or do I overlook something? (From: Ondřej Čada <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.