behaviour of _attribute__ ((packed))

Hi,

last weekend I tried Sun Studio Express and its compatibility with gcc.

I found out that cc will parse something like this:

typedef struct {

int a;

char b;

} __attribute__ ((packed)) my_t;

just fine, but will not pack the structure. Of course, there is #pragma pack(1) and #pragma pack(), but the fact that the packed attribute is being silently ignored makes some programs compilable by gcc non-portable to Sun Studio.

Are there any plans to make this attribute actually function?

Thanks,

Jakub

[568 byte] By [Jakuba] at [2007-11-27 4:52:11]
# 1

> Are there any plans to make this attribute actually function?

There are plans to make all the semantically important attributes to function.

Right now C compiler supports most of those, including aligned, alias, weak etc. I'll check whether final version supports packed.

C++ compiler is lagging behind. But it will eventually support the same set as C.

regards,

__Fedor.

SFVa at 2007-7-12 10:06:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
> Right now C compiler supports most of those, including aligned, alias, weak> etc. I'll check whether final version supports packed.So what is the bottom-line: does the final version of the C compiler support ((packed)) semantically?Thanks,Jakub
Jakuba at 2007-7-12 10:06:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...