There is no such attribute in sdcc.
for structs where the individual members are not bitfields there never is any padding in sdcc. Padding wouldn't make sense for 8-bit targets. So with sdcc you'll always get the layout, for which you might need something like a packed attribute in other compilers
Philipp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Must get struct size and layout correct.
Source looks like:
/// USB Info Basic Descriptor
typedef struct {
uint8 Type;
uint16 Size;
uint8 Checksum;
uint8 BitSetting;
uint16 VendorID;
uint16 HubProductID;
uint16 FunctionProductID;
uint8 HubPOTG;
uint8 HubCURT;
} __attribute__ ((packed)) TUSBUSBInfoBasicDescriptor;
Sent from Windows Mail
Last edit: Maarten Brock 2015-06-30
There is no such attribute in sdcc.
for structs where the individual members are not bitfields there never is any padding in sdcc. Padding wouldn't make sense for 8-bit targets. So with sdcc you'll always get the layout, for which you might need something like a packed attribute in other compilers
Philipp