Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
- Subject: Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
- From: "Sean McBride" <email@hidden>
- Date: Mon, 28 Jun 2010 15:56:39 -0400
- Organization: Rogue Research Inc.
On Fri, 18 Jun 2010 12:02:45 -0700, Bill Bumgarner said:
>> I have decided that this warning is counter-productive. When I
>implement a setter, clang shouldn't care.
>>
>> As is, when I implement a setter I have to remember to change the
>property declaration. And worse, if I decide I no longer need the
>setter, I have to remember to change the property declaration again, or
>risk hard to diagnose threading problems.
>>
>> So I want to disable that warning, but can't seem to figure out how.
I tried
>>
>> -Wno-warn-atomic-property-rule
>>
>> but that just gives me "warning: unknown warning option" for each file...
>>
>> Any ideas?
>
>Yes; listen to the compiler and don't try to turn off the warning. It
>is behaving correctly and identifying a very real issue in your code.
>
>If you declare an @property that is atomic -- the default -- you must
>either use @dynamic, let the compiler @synthesize everything or provide
>an implementation of both the setter and getter.
>
>If you want to mix a manual implementation of, say, the setter with an
>@synthesize, declare the @property to be `nonatomic`.
>
>This behavior exists because it is impossible for you to declare
>something to be atomic and then provide only half of the implementation.
How is this warning enabled? I'm not seeing it where I'd expect to...
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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