Re: App hangs when displaying any sheet in 10.5 [SOLVED]
Re: App hangs when displaying any sheet in 10.5 [SOLVED]
- Subject: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
- From: Graham Cox <email@hidden>
- Date: Sun, 8 Jun 2008 22:29:25 +1000
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 (email@hidden)
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:
This email sent to email@hidden