This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

unaligned access on Sparc Solaris



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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]