no, the type I am using in this instance is for int64_t. the range for int64_t
is from
-9,223,372,036,854,775,808..9,223,372,036,854,775,807
or
-(2^63)..(2^63)-1
interesting,
const int64_t t=-9223372036854775808;
cout<<t<<endl;
seem to output the proper number.
but the compiler warning is inappropriate for a valid constant. I suspect it
is an off-by-1 error in the parser or lexer in gcc.
>________________________________
> From: JonY <[email protected]>
>To: [email protected]
>Sent: Wednesday, March 14, 2012 2:18 AM
>Subject: Re: [Mingw-w64-public] compiler bug in 20111127 RE: -MAXINT for
>int64_t
>
>On 3/14/2012 13:57, Jim Michaels wrote:
>> -9223372036854775808LL
>>
>> rnd.h:130:63: warning: integer constant is so large that it is unsigned
>> [enabled by default]
>>
>> that's like saying for an int16_t, -32768 is not allowed, which is
>> -2^15=-32,768 according to ttcalc.
>>
>> I have -2^63=-9,223,372,036,854,775,808 according to ttcalc.
>> I simply pasted the value in from the bignum calculator and removed the
>> commas.
>>
>> I know the valid range of values for int64_t is -2^63..2^63-1
>> but the compiler that is supposed to handle these constants is not obeying
>> for int64_t only.
>>
>>
>> I did not get errors when I put in similar types of calculated values for
>> int32_t, int16_t, and int8_t.
>>
>>
>
>Maybe you want unsigned 64bit instead, see uint64_t.
>
>
>
>------------------------------------------------------------------------------
>Virtualization & Cloud Management Using Capacity Planning
>Cloud computing makes use of virtualization - but cloud computing
>also focuses on allowing computing to be delivered as a service.
>http://www.accelacomm.com/jaw/sfnl/114/51521223/
>_______________________________________________
>Mingw-w64-public mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public