On Wed, 25 Aug 1999, Michael S. Davis wrote:
> On Wed, 25 Aug 1999, Kenichi Okuyama wrote:
>
> > CodeWarrior, have flags to supports long long ( or was it longlong?
> > ) keyword, which stands for 64bit fixed point variable. GCC, as
> > default, also supports keyword "long long" for 64bit fixed point
> > variable.
I must be missing something here. I tried long long declaration of a
variable and tried to assign a value to it and got a compiler warning.
I created a simple routine to take a hard coded 'long long' and return
the Hex value. The compiler (GCC) warned that the:
"the constant value is so large that it is unsigned". The value input
was representable as a 32 bit integer. So, it was not too large for 64
bits???
Here is the code:
void DispHex() {
long long x;
char hex[17];
int i;
x = 2348719048;
for(i=0;i<16;i++) {
hex[i] = GetNib(x, i); // where this returns single char
}
hex[16] = 0;
SetFieldText(fldOutput, hex); // my routine to display string in
field
}
Why does assigning x to this value result in an integer that has a
value that is out of range? It also displays the wrong value. What
is the format of the long long? Is it just a 64 bit binary?
Thanks
Mike (looking for GCC compiler manual) Davis