Re: A Short DO Problem
Re: A Short DO Problem
- Subject: Re: A Short DO Problem
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 15 Aug 2002 08:42:42 +0200
On Donnerstag, August 15, 2002, at 12:10 , Marcel Weiher wrote:
On Wednesday, August 14, 2002, at 10:31 Uhr, Gerriet M. Denkmann wrote:
C function probably always return an int, even if the return value is
actually shorter.
If only it were so!
Objectiv-C methods probably do the same.
Alas, Apple's PowerPC runtime architecture specifies that unused bits
of register are "undefined", meaning the caller has to clear them.
Well, but the question is: who is the "caller"?
Is it the compiler, who should generate instructions to clear the
unwanted bits, or is it the programmer?
if ( [ aDistantObject returnUnsignedShort0xbeef ] != 0xbeef )
printf("This is real bad. But who is to blame?\n");
Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.