I'm trying to get rid of an annoying warning that CLANG/LLVM 3.0 is giving me. I have the following ivar set in my object:
bool preloaded;
And the following property declaration:
@property(readonly) bool preloaded;
And the following synthesize call:
@synthesize preloaded;
As it stands, the compiler complains:
Property is assumed atomic by default
If I change the property declaration to add "atomic":
@property(atomic,readonly) bool preloaded;
It complains about that, too:
error: expected a property attribute before 'atomic'
So it appears I'm damned if I do and damned if I don't... Is there something I'm missing?
It seems you have the Implicit Atomic Objective-C Properties LLVM compiler warning enabled in your project settings. Turning this off will remove the warning.
As noted above, atomic
is not a valid keyword, and is merely implied by the absence of nonatomic
. From Apple's Declared Properties documentation:
You can use this attribute to specify that accessor methods are not atomic. (There is no keyword to denote atomic.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With