title: Array inside a bit-packed struct
body: <p>I'd like to have an array inside of a bit-packed struct.  I statically know the size of the array (32), and I'd like each element in the array to be a single bit.  For example, I would like to be able to say something like:</p>
  
  <pre><code>struct example_s {
    // ...
    unsigned int flags[32] : 32;
  } __attribute__((__packed__));
  </code></pre>
  
  <p>I've tried a couple things, but gcc won't budge.  It would be nice to be able to do this so that I could write clean code that iterated over the elements in the packed array.  Ideas?</p>