According to Apple’s documentation here, this should work in my code:
@interface Menu () {
int testIvar;
}
-(void)privateMethod;
@end
This works if I don’t try to declare an iVar. As soon as I add the curly braces and what is between them, I get this nice red warning:
Expected identifier or ‘(‘ before ‘{‘ token
What’s going on here?
(Turning my comment into an answer…)
GCC of any kind won’t do this for you, nor will LLVM < 2.0, as the docs you linked to state:
Make sure you’re using the most recent compiler available to you (if you’re using Xcode < 4 you may be out of luck).