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]

Re: PATCH: Find more ObjC methods


Pete French wrote:

There is also a convention of not shoveling loads of things into the same
source file in ObjC too though. If you stuck to one file per object or category
then the problem doesnt arise. I would have said the new behaviour is very
sensible - i.e. if a method on a class is visible in a source file then it is
understood to be avaialble throughout the rest of the source file. Indeed,
thats how I thought it already worked, and was rather siurprised to find it
doesnt!

The new behaviour seems 1) very reasonable and 2) enirely consistent with what
C does. If you follow the convention of each category in its own source
file then you get the same warnings you do now.



There are good reasons to #include/#import several implementation files into a single compilation unit. (e.g. access to static global variable/functions). We use this in several larger projects, where the files can be maintained by different developers. So even if this isn't reverted (and I do conceed to the new behavior in the sense that it is /using/ the prototype), I hope a patch that will introduce an optional warning with a more accurate warning would be acceptable.


Cheers,
David



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]