| www.delorie.com/archives/browse.cgi | search |
| From: | "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> |
| To: | DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU |
| Date: | Fri, 11 Aug 1995 16:32:14 BST |
| Subject: | Packed structs |
If I have this struct:-
typedef struct{char miaow; int mice_caught,birds_caught; char*name;} cat;
and it needs to be packed, i.e. the fields starting at bytes 0, 1, 5, 9, and
the whole struct exactly 13 bytes long with no extra bytes inserted to fill
out to a multiple of 2 or 4, should I insert `__attribute__((packed))' after
`cat', or before any `;' where djgpp would otherwise be tempted to insert
filling bytes, or where?
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |