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] |
Other format: | [Raw text] |
On Fri, 2005-04-15 at 09:27 -0600, E. Weddington wrote:I would interpret it that way too: packed pointer to struct. The "packed" attribute is on the variable itself, not the type of the variable (pointer to struct)
It seems that GCC will interpret the above as e1 and e2 is packed within the struct somestruct so that e2 "immediately follows e1" (according to the manual). The packed attribute in this case does not refer to what e1 and e2 is pointing to.
That's what I found out by experimenting and is the reason why I am asking. From what I see on i386,
struct entrystruct * entry __attribute__ ((packed));
is interpreted as "packed pointer to struct"
not as "pointer to packed struct",
i.e. this construct is not meaningful.Is it?
You've got the point - I am collecting ammunition to fight a stubbornYeah, if that author was thinking that the packed attribute applied to what the variable pointed to, then I would think that it is wrong usage of the attribute.
original author :-)
HTH Eric
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |