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]

Alignment option


Hi,

I'm having a a problem using the pragma pack with gcc version 2.95.1 on 
solaris and sparc system.

ie:

#pragma pack(4)
struct testStruct
{
..
   double var;
}
#pragma pack()


void test(double* src)
{
   double dst;
   dst = *src;
}

and naturally, the SIGBUS error occurs when:

testStruct s;
test(&s.var);

Even when I tried to compile with -munaligned-doubles, it didn't resolve the 
problem. Which flag must be set?

Thanks for your help,

Philippe


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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