This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
unaligned access on Sparc Solaris
- To: gcc at gcc dot gnu dot org
- Subject: unaligned access on Sparc Solaris
- From: Davy Durham <david dot durham at wcom dot com>
- Date: Thu, 12 Oct 2000 15:37:56 -0400
- Organization: WorldCom
On gcc on Sparc Solaris I need to be able to access data on unaligned
boundries...
For instance:
char buffer[256];
int *i=(int *)(buffer+1);
(*i)=3;
Right now the 3rd line causes a bus error.... Is there a compiler flag
or pragma that will allow me to do this? Sun's compiler has a -misalign
flag, but I'm trying to get away from it because it's too buggy...
I've search a bit through the old archives and have found little
help.....
Thanks,
Davy