cancel
Showing results for 
Search instead for 
Did you mean: 

STR750 and long long 64 bits

xaviooo
Associate II
Posted on June 07, 2007 at 05:08

STR750 and long long 64 bits

4 REPLIES 4
xaviooo
Associate II
Posted on June 06, 2007 at 14:41

Hello,

My question is simple.

Does the STR750 support this :

typedef long long u64 ?

I'm trying to do this :

u32 a;

u32 b;

long long c ;

c = (u32)a * (u32)b;

but it dosen't work...

Thank you for your help.

-Xavier

I'm trying to

[ This message was edited by: Xavio on 07-06-2007 08:32 ]

sjo
Associate II
Posted on June 06, 2007 at 16:47

This is down to to compiler not the device, works fine on all the tools i have tried.

What tools are you using ?

It would not help that you are casting your result to 32bits.

Regards

sjo

kleshov
Associate II
Posted on June 07, 2007 at 03:39

I think what you are trying to do is this:

u32 a, b;

u64 c;

c = (u64)a * (u64)b;

In C, it is assumed that the result of u32*u32 is u32, unless you tell the compiler otherwise.

- mike

xaviooo
Associate II
Posted on June 07, 2007 at 05:08

Thank you so much for your answers, it works.