Private @implementation methods of the main @implementation become fully visable to any following code. The compiler should warn if they are used outside of the class.
Created attachment 4890 [details] Testcase
It was caused by this patch: 2003-10-03 Alexander Malmberg <alexander@malmberg.org> Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (add_method_to_hash_list, lookup_category): New functions. (lookup_method_in_hash_lists): New parameter indicating whether we are messaging 'Class' or 'id'. (check_duplicates): Likewise; do not assume all methods will be either class or instance methods. (generate_category, finish_class): Use lookup_category(). (add_method): Use add_method_to_hash_list(); insert instance methods of root classes into the global class method hash table. (add_category): Use lookup_category(); avoid constructing duplicate categories. (really_start_method): Add method to corresponding @interface, if not already there (and if the @interface exists). (finish_message_expr, finish_objc): Adjust calls to check_duplicates(). I want to say this is correct behavior though (but I do not want to get into a fight over this), I will let someone else decide this one.
The patch removes the warning which was previously emitted when a method undeclared on an @interface section is used outside of it's @implementation context. The warning is inappropriately worded for this case. A patch for a more meaningful warning is under discussion.