Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64 bit addressing



On Saturday, June 28, 2003, at 12:10 PM, Chris Kane wrote:
[...]
Hopefully when 64-bit tasks become a real possibility for developers, there will be compiler options to complain about pointer-to-int conversions even if there is a cast, or to ignore many kinds of casts, or whatever. Options that could be turned on to help the conversion, then turned off again (probably).
[...]

Fortunately, there already is such a warning:

void *foo(unsigned short x)
{
return (void *)x;
}

foo.c: In function `foo':
foo.c:3: warning: cast to pointer from integer of different size

Presumably this would take effect for the congruent case of a 32-bit int being casted to a 64-bit pointer.

-tim
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: 64 bit addressing (From: Chris Kane <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.