discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Find more ObjC methods


From: Devang Patel
Subject: Re: PATCH: Find more ObjC methods
Date: Tue, 7 Oct 2003 09:42:17 -0700


On Oct 7, 2003, at 3:08 AM, David Ayers wrote:

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.

Allow me to explain the issue in such a way so that C++ gurus
can help us to end this discussion.

In C++, functions can be overloaded with different signatures.
It is compiler's responsibility to select unambiguous function
at the call site using overloading rules. If compiler can not
find one unambiguous function, it raises errors.

Objective-C's dynamic nature does not want compiler to
do lots of work. Selecting proper method is runtime's job.
Even if compiler does not find a method with given name, compiler
does not raise error. It is runtime's responsibility. But to
help users in such situation (you can imagine why) compiler
issues warning saying foo may not respond to bar.

Now, with this background lets discussion current issue.
Before Zem's recent patch, GCC had bug in the sense it used to
warn 'foo may not respond to bar' in situations where, it can
determine that foo responds to bar. So now GCC does not
issue warnings in such cases. And we are discussing in this
thread whether we should add new command line option to
enable 'wrong' compiler warnings. I do not approve such patch.

(BTW, I do not have power to reject such patch.)
--
Devang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]