This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Fine, I must admit for large files with multiple categories the old behavior gives a reassurance that such methods are only used within the corresponding category. But if you must, then collect all implementations prototypes of a class.
Example: @interface Foo -(void)somePublicMethod; @end
@implementation Foo -(void)somePublicMethod {}; -(void)somePrivatMethod {}; -(void)someOtherPrivateMethod { [self somePrivateMethod]; } @end
@implementation Foo (aCategory)
-(void)somePrivatCategoryMethod {};
-(void)someOtherCategoryMethod
{
[self somePrivatCategoryMethod];
[self somePrivatMethod]; /* <- should not see the prototype and warn! */
}
@end
No, here is where I disagree. Clearly, the compiler has seen the @implementation containing the method in question, so it knows it is there. Not sure why you'd want the compiler to look the other way? :-)
I've opened a bug report: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12516
Cheers, David
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |