[CMake] 64bit programming

John Doe ufnoise at gmail.com
Mon Aug 25 14:10:51 EDT 2008


>> Usually, that should never be a problem as casting from long to a pointer
>> and back is really good coding style in modern C (about the same as not
>> differing between function/code pointer and data pointers).

I think that size_t would be more appropriate than a signed long.  If
you need sign, than perhaps ptrdiff_t.

Juan


On Mon, Aug 25, 2008 at 11:09 AM, Matthew Woehlke
<mw_triad at users.sourceforge.net> wrote:
> Hendrik Sattler wrote:
>>
>> Am Samstag, 23. August 2008 02:34:35 schrieb Matthew Woehlke:
>>>
>>> Don't make assumptions about sizeof(long) or sizeof(void*)... not even
>>> that they are the same (Microsoft, in their infinite wisdom, decided -
>>> as usual - to be different from everyone else and adopt a P64 model,
>>> rather than LP64 used by *everyone* else). That's the big thing. I don't
>>> know about kitware libraries, but I wouldn't expect much in the way of
>>> "gotchas" regarding 64-bit builds and cmake... at least, not on
>>> non-Windows platforms :-).
>>
>> Usually, that should never be a problem as casting from long to a pointer
>> and back is really good coding style in modern C (about the same as not
>> differing between function/code pointer and data pointers).
>
> Unless I misunderstood the above, you're missing "really good coding style
> in modern C **unless you ever want to support Windows**"...
>
> --
> Matthew
> Person A: It's an ISO standard.
> Person B: ...And that means what?
>  --mal (http://theangryadmin.blogspot.com/2008/04/future.html)
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list