>>>>> "Ralf" == Ralf Corsepius <[EMAIL PROTECTED]> writes:

 Ralf> struct entrystruct * entry __attribute__ ((packed));

 Ralf> is interpreted as "packed pointer to struct" not as "pointer to
 Ralf> packed struct", i.e. this construct is not meaningful.

Yes it's meaningful, it may not be what you intended.

It sure would be useful, though, if there were a construct that does
mean "pointer to packed T".  In particular, I've often needed "pointer
to packed int" and found no way to produce that.  I ended up creating
a one-member struct with a packed int inside, which is a syntactic
nightmare.   (The application was a piece of legacy code that was
writing via int pointers, but sometimes things were not aligned.  The
fix was much more invasive than it should have been because I could
find no way to define a pointer to packed int.)  If there IS a way to
do that, it sure would be nice for the docs to explain it.  Right now
the documentation of "packed" is essentially unintellegible.

    paul

Reply via email to