public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 64 bit assignment trouble on a 32 bit platform
@ 2007-10-29  9:37 kum
  2007-10-29 10:01 ` Samuel Tardieu
  2007-10-29 10:40 ` Rask Ingemann Lambertsen
  0 siblings, 2 replies; 3+ messages in thread
From: kum @ 2007-10-29  9:37 UTC (permalink / raw)
  To: gcc

hi,

UINT64 a64; // UINT64 has been typedefed as long long unsigned int
UINT32 a32, b32;
a32 = x; // some value
b32 = y; // some value

a64 = a32 * b32;
a64 += a32 + b32;

Is it necessary to type-cast both a32 and b32 to make above statements
to work as expected? Without casting, I find that addition works while
the multiplication does not. Is there a compiler option to make this
work without casting? I am using gcc 4.1.1 on an xscale platform.

Thanks,
kumaresh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-29 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-29  9:37 64 bit assignment trouble on a 32 bit platform kum
2007-10-29 10:01 ` Samuel Tardieu
2007-10-29 10:40 ` Rask Ingemann Lambertsen

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 read-only IMAP folder(s) and NNTP newsgroup(s).