64-bit constants in source code

Christian Thalinger Christian.Thalinger at Sun.COM
Tue Jun 16 10:37:02 PDT 2009


David Holmes - Sun Microsystems wrote:
> Christian,
> 
> According to the definition of the macro you should have used a LL 
> suffix not just L.

Right.  I noticed that because of a picky GCC.

> 
> The macros deal with compiler specific mechanisms for defining 64-bit 
> constants. Looks like gcc and SS have converged these days, but Visual 
> Studio is quite different:
> 
> globalDefinitions_gcc.hpp:#define CONST64(x)  (x ## LL)
> globalDefinitions_gcc.hpp:#define UCONST64(x) (x ## ULL)
> globalDefinitions_sparcWorks.hpp:#define CONST64(x)  (x ## LL)
> globalDefinitions_sparcWorks.hpp:#define UCONST64(x) (x ## ULL)
> globalDefinitions_visCPP.hpp:#define CONST64(x)  (x ## i64)
> globalDefinitions_visCPP.hpp:#define UCONST64(x) ((uint64_t)CONST64(x))

I think I change my code to use them.

-- Christian



More information about the hotspot-dev mailing list