Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: manus@eiffel.com (Emmanuel STAPF [ISE])
Subject: Unaligned access
Date: 5 Mar 2003 22:27:31 -0800	[thread overview]
Message-ID: <2f47c0e6.0303052007.440571b5@posting.google.com> (raw)

I'm getting an unaligned access error message in my program.
Unfortunately it only occurs when `-O2' is specified. I therefore had
to compile with `-O2 -g3' in order to debug it, but the location it
reports the unaligned access is in a call to memcpy and there does not
seem to be a way to access the value of locals and arguments. The line
of code looks like:

memcpy (dest, &i, sizeof(int));

where `dest' is a char *, most likely unaligned since it is an
arbitrary memory area.
where `i' is an argument passed to the function in which `memcpy' is
called.

Any hint on how to solve this,
Thanks,
Manu


uname -a reports:
OSF1 tellus.enea.se V5.1 1885 alpha

gemc_cc -V reports:
Compaq C V6.4-009 on Compaq Tru64 UNIX V5.1A (Rev. 1885)

cc -v reports:
Compaq C V6.4-214 (dtk) on Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.4-014 (dtk) cc Driver


                 reply	other threads:[~2003-03-06  6:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox