• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A Short DO Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: A Short DO Problem (From: Marcel Weiher <email@hidden>)

  • Prev by Date: open textedit with UTF8 encoding
  • Next by Date: Re: Classes in bundles
  • Previous by thread: Re: A Short DO Problem
  • Next by thread: [OT] www.stepwise.com down?
  • Index(es):
    • Date
    • Thread