No, this is not it. The method definitely did have a prototype - in fact it had *two*, differing only in return type. Judging by the assembler code, it used the one returning an int (actually an enum) not a float. It's still unclear why this generated code that trashed memory, but it did. It also did silently cast the result as well, which is perhaps why no warning was issued, because in some cases that's the desired behaviour.

G.



On 7 Jun 2008, at 1:50 am, Michael Vannorsdel wrote:

I suspect since the method had no prototype the compiler just assumed the default id return type, but due to a bug didn't generate a warning. The problem is most likely the calling method was expecting the return value to be an integer (id; pointer) but instead is a float. Even with a cast being assumed the calling method is still having a floating point register trashed by believing it was safe.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to