* 64 bits int on ia32
@ 2004-10-09 14:17 Ricardo Catalinas Jimenez
2004-10-09 14:57 ` Ron Michael Khu
2004-10-09 20:16 ` Jan-Benedict Glaw
0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Catalinas Jimenez @ 2004-10-09 14:17 UTC (permalink / raw)
To: linux-c-programming
Hi everybody,
I know the 'long long' type, I also try 'sizeof(long long)' and it returns 8.
But when I use it, the max number it can store is 0xffffffff.
So, is there any way to get 64bits ints on a ia32? (of course I am talking
only about the gcc compiler, I know that I can't manage those amounts of bits
and store them on a general porpouse register)
Thanks in advance.
--
Ricardo Catalinas Jimenez Madrid, Spain.
th1nk3r(at)server01(dot)org citizen01@jabber.org
My gpg public key at: http://www.server01.org/pubkey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 64 bits int on ia32
2004-10-09 14:17 64 bits int on ia32 Ricardo Catalinas Jimenez
@ 2004-10-09 14:57 ` Ron Michael Khu
2004-10-09 20:16 ` Jan-Benedict Glaw
1 sibling, 0 replies; 4+ messages in thread
From: Ron Michael Khu @ 2004-10-09 14:57 UTC (permalink / raw)
To: Ricardo Catalinas Jimenez; +Cc: linux-c-programming
how about using "unsigned"??
Ricardo Catalinas Jimenez wrote:
>Hi everybody,
>
>I know the 'long long' type, I also try 'sizeof(long long)' and it returns 8.
>But when I use it, the max number it can store is 0xffffffff.
>
>So, is there any way to get 64bits ints on a ia32? (of course I am talking
>only about the gcc compiler, I know that I can't manage those amounts of bits
>and store them on a general porpouse register)
>
>
>Thanks in advance.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 64 bits int on ia32
2004-10-09 14:17 64 bits int on ia32 Ricardo Catalinas Jimenez
2004-10-09 14:57 ` Ron Michael Khu
@ 2004-10-09 20:16 ` Jan-Benedict Glaw
2004-10-11 3:00 ` Ron Michael Khu
1 sibling, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-10-09 20:16 UTC (permalink / raw)
To: linux-c-programming
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
On Sat, 2004-10-09 16:17:39 +0200, Ricardo Catalinas Jimenez <th1nk3r@server01.org>
wrote in message <20041009141739.GA2134@jehuty.server01.org>:
> Hi everybody,
>
> I know the 'long long' type, I also try 'sizeof(long long)' and it returns 8.
> But when I use it, the max number it can store is 0xffffffff.
How did you check that this is the largest number? I guess you either
used a wrong format specifier for a printf call (that'd clamp the value
to it's low-order long value). Also note that you should probably add a
type suffix of "LL" or "ULL" to that value, cf. 6.4.4.1 of the C99
standard.
So how did you use the long long typed variable?
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 64 bits int on ia32
2004-10-09 20:16 ` Jan-Benedict Glaw
@ 2004-10-11 3:00 ` Ron Michael Khu
0 siblings, 0 replies; 4+ messages in thread
From: Ron Michael Khu @ 2004-10-11 3:00 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: linux-c-programming
He already solved it =)
he was using the wrong formatting symbol...
Jan-Benedict Glaw wrote:
>On Sat, 2004-10-09 16:17:39 +0200, Ricardo Catalinas Jimenez <th1nk3r@server01.org>
>wrote in message <20041009141739.GA2134@jehuty.server01.org>:
>
>
>>Hi everybody,
>>
>>I know the 'long long' type, I also try 'sizeof(long long)' and it returns 8.
>>But when I use it, the max number it can store is 0xffffffff.
>>
>>
>
>How did you check that this is the largest number? I guess you either
>used a wrong format specifier for a printf call (that'd clamp the value
>to it's low-order long value). Also note that you should probably add a
>type suffix of "LL" or "ULL" to that value, cf. 6.4.4.1 of the C99
>standard.
>
>So how did you use the long long typed variable?
>
>MfG, JBG
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-11 3:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-09 14:17 64 bits int on ia32 Ricardo Catalinas Jimenez
2004-10-09 14:57 ` Ron Michael Khu
2004-10-09 20:16 ` Jan-Benedict Glaw
2004-10-11 3:00 ` Ron Michael Khu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).