• 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: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?


  • Subject: Re: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
  • From: Michael Babin <email@hidden>
  • Date: Sun, 10 Oct 2010 10:12:05 -0500

On Oct 10, 2010, at 7:10 AM, Jerry Krinock wrote:

> I switched a project from gcc to LLVM compiler.  I got a bunch of warnings indicating that writable atomic property cannot pair synthesized setter/getter user defined setter/getter.  I understand that the answer is given in this thread:
>
> http://www.cocoabuilder.com/archive/xcode/289179-xcode-3-2-3-cannot-pair-synthesized-setter-getter-with-user-defined-setter-getter.html
>
> In deciding how to solve the problem, I'd like to know how gcc solved the problem!  It seems there are three choices:
>
> (1) Wrap my non-atomic custom setter/getter code to make it atomic.
> (2) Change my declaration to make it nonatomic.
> (3) Somehow ignore the rule and compile the code as I wrote it.
>
> Which did gcc do?

What would lead you to conclude that gcc "solved the problem"? In general, option 3 (the compiler compiles the code as you wrote it) is in effect.

While I haven't personally seen the exact warning referred to in the earlier thread you are referencing, my understanding from reading that thread is that this is a warning issued by LLVM, so it too will compile your code as you wrote it (unless you have the "Treat Warnings as Errors" option enabled).

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How did gcc handle synthesized atomic vs custom nonatomic setter/getter? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Efficiently exporting CoreData objects as CSV
  • Next by Date: Re: NSDictionary setValue KVO
  • Previous by thread: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
  • Next by thread: Re: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
  • Index(es):
    • Date
    • Thread