• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Bill Bumgarner <email@hidden>
  • Date: Fri, 18 Jun 2010 12:02:45 -0700

On Jun 18, 2010, at 10:50 AM, Gerd Knops wrote:

> 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.

b.bum


 _______________________________________________
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

  • Follow-Ups:
    • Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
      • From: "Sean McBride" <email@hidden>
    • Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
      • From: Christiaan Hofman <email@hidden>
References: 
 >Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter (From: Gerd Knops <email@hidden>)
 >Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter (From: Roland King <email@hidden>)
 >Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter (From: Gerd Knops <email@hidden>)

  • Prev by Date: extra boost libraries
  • Next by Date: Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
  • Previous by thread: Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
  • Next by thread: Re: Xcode 3.2.3: cannot pair a synthesized setter/getter with a user defined setter/getter
  • Index(es):
    • Date
    • Thread