title: object won't pack data
body: <p>I'm trying to pack data in a c++ struct.</p>
  
  <p>My struct has this layout:</p>
  
  <pre><code>struct structName
  {
    int16_t member1;
    int32_t member2;
    uint32_t member3;
    uint32_t member4;
    uint32_t member5;
    etc
  }__attribute__((packed));
  </code></pre>
  
  <p>Using <code>offsetof($structname, $membername)</code> I get back the correct offsets of the data (0,2,6,10,14 . . .), but when I access the data by member-name I get the data at 4 byte offsets (0,4,8,12,16 . . .) as if the struct wasn't packed. </p>
  
  <p>Is</p>
  
  <pre><code>} __attribute__((packed));
  </code></pre>
  
  <p>the correct way to make a struct packed?
      .
      .</p>