This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Alignment option
- To: gcc at gcc dot gnu dot org
- Subject: Alignment option
- From: "Philippe Bonneau" <phbonneau at hotmail dot com>
- Date: Fri, 11 Aug 2000 15:39:34 CEST
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