[cfe-dev] Fixing selector types on the GNU runtime
Mike Stump
mrs at apple.com
Wed Jan 21 11:18:47 PST 2009
On Jan 21, 2009, at 11:07 AM, David Chisnall wrote:
> On 21 Jan 2009, at 19:04, Mike Stump wrote:
>
>> On Jan 21, 2009, at 4:18 AM, David Chisnall wrote:
>>> my diff will avoid real issues on platforms like Win64, where 0
>>> and 0L, the two suggested definitions of NULL from the standard,
>>> are both smaller than pointers.
>>
>> What _is_ NULL defined to on Win64?
>
> I presume that depends on the compiler you use and the headers you
> include...
On those platforms for which it will fix real issues as quoted above.
This excludes clang, g++, llvm-g++ to name a few where I'm reasonably
certain there will be no problems. I'm trying to ascertain if you are
raising a theoretic point, or a real issue. Anyway, seems more
reliable to just redefine NULL on those platforms that define it
incorrectly for our needs, as otherwise people will put in NULL, and
people will likely miss converting it.
To help ensure we never have an issue, we could:
assert (sizeof (NULL) == sizeof (void *));
someplace.
More information about the cfe-dev
mailing list