gcc 2.95.2 has problems with packing and alignment on AIX 4.3

grahams grahams@rcp.co.uk
Tue Nov 30 23:39:00 GMT 1999


Jeff

I believe it's the placement of the packed attribute
that's causing the problems.

struct _dc_packed
{
        double  d_packed        __attribute__ ((packed));
        char    c_packed        __attribute__ ((packed));
};

I can get the expected packing with the mainline 19991102 snapshot 
when using either of the following, whereas you original does not
result in a packed structure.

struct _dc_packed
{
	double __attribute__((packed))	d_packed;
	char   __attribute__((packed))	c_packed;
};

struct _dc_packed
{
        double  d_packed;
        char    c_packed;
} __attribute__ ((packed));


Graham



More information about the Gcc-bugs mailing list