Re: [Sdcc-user] Packed structs

2019-07-05 Thread Jacob Jennings
Makes sense - thanks for the info. On Fri, Jul 5, 2019 at 3:15 PM Alan Cox wrote: > On Thu, 4 Jul 2019 17:35:15 -0700 > Jacob Jennings wrote: > > > Hello, > > > > I am fond of using __attribute__((packed)) to document register > definitions > > in this manner: > > > > typedef struct BitField {

Re: [Sdcc-user] Packed structs

2019-07-05 Thread Alan Cox
On Thu, 4 Jul 2019 17:35:15 -0700 Jacob Jennings wrote: > Hello, > > I am fond of using __attribute__((packed)) to document register definitions > in this manner: > > typedef struct BitField { > bool b7; > bool b6; > bool b5; > bool b4; > bool b3; > bool b2; > bool b1; > bool b0; > } __attribut

Re: [Sdcc-user] Packed structs

2019-07-05 Thread Maarten Brock
Hello Jacob, On an 8-bit processor structs usually are by packed by design as there is no reason for interspersed bytes to overcome alignment drawbacks. As such SDCC has no packing options/pragmas/language extensions. Maarten > Hello, > > I am fond of using __attribute__((packed)) to document re