[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
const uint64_t initialization problem
From: |
Mike - EMAIL IGNORED |
Subject: |
const uint64_t initialization problem |
Date: |
Thu, 07 Dec 2006 12:26:17 -0500 |
User-agent: |
Pan/0.14.2.91 (As She Crawled Across the Table) |
On FC4 with g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8):
unsigned long long int mask = 0x003fffffffffffff;
const uint64_t mask = 0x003fffffffffffff;
const uint64_t mask = static_cast<uint64_t>(0x003fffffffffffff);
all result in:
error: integer constant is too large for 'long' type
I workaround with:
const uint64_t mask = (0x003fffff << 32) | 0xffffffff;
Is this as expected? Is it fixed in a later version?
Thanks,
Mike.
- const uint64_t initialization problem,
Mike - EMAIL IGNORED <=