[ros-dev] Re: Compiler-independence for 64-bit integral constants

Royce Mitchell III royce3 at ev1.net
Sat Oct 9 15:15:28 CEST 2004


Kohn Emil Dan wrote:

>How about avoiding the compiler suffix altogether and only cast the
>constants to a (platform independent) typedef, something like
>this:
>
>#ifdef __GNUC__
>typedef long long INT64;
>#elif defined _MSC_VER
>typedef __int64 INT64;
>#else
>#error Please define the INT64 typedef according to your platform
>#endif
>
I can forsee one possible problem with your suggestion... I don't think 
the following would give the desired results:

(INT64)0x100000000

-- 
------------------------
http://wecanstopspam.org



More information about the Ros-dev mailing list