On Thu, 07 Dec 2006 12:26:17 -0500, Mike - EMAIL IGNORED wrote:
> 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.
Correction. I need:
const uint64_t mask =
((static_cast<uint64_t>(0x003fffff) << 32) | 0xffffffff;
Mike.
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus