Re: Bug crashes gcc 4.2.1
Re: Bug crashes gcc 4.2.1
- Subject: Re: Bug crashes gcc 4.2.1
- From: Rick Mann <email@hidden>
- Date: Wed, 23 Sep 2009 21:18:44 -0700
Okay, I've figured out what causes the crash. When a property is
defined to have a C++ object as its type, and that type has a copy
constructor, then reading that property with dot syntax causes the
crash. If either the copy constructor doesn't exist, or message syntax
is used, the crash does not occur.
I will write a formal bug when I'm back online (another reason to have
a Radar REST API: a native app could be use while I'm on the train
here without connectivity, and queue the bug for submission later).
The following code reproduces the problem:
class MyClass
{
public:
MyClass();
MyClass(const MyClass& inMyClass); // comment out this line to fix
};
@interface Foo : NSObject
{
MyClass mMember;
}
@property MyClass member;
@end
@implementation Foo
@synthesize member = mMember;
- (id)
init
{
self = [super init];
if (self != nil)
{
MyClass f = self.member; // change syntax to fix
}
return self;
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden