This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Bamboozled by long long
- From: arijitg at uci dot edu
- To: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 19 Jul 2002 13:11:54 -0800
- Subject: Re: Bamboozled by long long
I tried running it on my system with both options.
llx works while LX does not.
My system is sunOS5.7 just in case.
thanks guys for the prompt and right response. :)
---------Included Message----------
>Date: Fri, 19 Jul 2002 12:31:23 -0700
>From: "Gokhan Kisacikoglu" <kisa@centropolisfx.com>
>Reply-To: <kisa@centropolisfx.com>
>To: "John Love-Jensen" <eljay@adobe.com>
>Cc: <arijitg@uci.edu>, <gcc-help@gcc.gnu.org>
>Subject: Re: Bamboozled by long long
>
>
>> unsigned long long k=1;
>> unsigned int i = 4;
>> printf("The values are i: %d, , k: %LX, i+k: %LX \n", i,k , i+k);
>> k = k + i;
>> printf("The values are i: %d, , k: %LX, i+k: %LX \n", i,k , i+k);
>>
>> ...depending on the extension (or convention for long long) used.
>>
>> --Eljay
>
>
>This is not correct, this will only work with double precision float
>numbers. "long long" is really "long long int" and only ll should be
>used. This is from the man page (on my system):
>
> ll For n, the argument has type pointer to long long int;
for
>d
> and i, long long int; and for o, u, x, and X, unsigned
long
> long int.
>
> L For b, B, e, E, f, g, and G, the argument has type long
> double.
>
>
---------End of Included Message----------