On Mon, Aug 25, 2008 at 4:48 PM, Nate Weaver <[EMAIL PROTECTED]> wrote: > Addendum: I guess the format should actually be %O (unsigned long) instead > of %o (unsigned int) since it's defined as an unsigned long, though the > upper bits probably won't be filled at all.
The problem is not whether the upper bits are used, but how the arguments are passed. In 32-bit land, longs and ints are identical and thus it makes no difference which one you use. In 64-bit land, longs are 64-bit but ints are only 32-bit. Depending on the calling conventions being used (and I'm not familiar with Mac OS X 64-bit vararg calling conventions) then having printf only grab 32 bits even though you're giving it 64 bits could cause some very screwed up results. Hypothetically speaking it could even cause a crash or corrupt memory, although realistically I doubt that would happen in this case on any existing platform. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) 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]
