title: Are anonymous struct declarators legal in Ansi C?
body: <p>I assume something like this cast is legal (where foo is a pointer to void) :</p>
  
  <pre><code>struct on_off {
                    unsigned light : 1;
                    unsigned toaster : 1;
                    int count;            /* 4 bytes */
                    unsigned ac : 4;
                    unsigned : 4;
                    unsigned clock : 1;
                    unsigned : 0;
                    unsigned flag : 1;
                   };
  
  ((on_off) foo).count = 3;
  </code></pre>
  
  <p>But I'm wondering if the struct is <em>not</em> defined whether something like this is legal :</p>
  
  <pre><code>((struct {
                    unsigned light : 1;
                    unsigned toaster : 1;
                    int count;            /* 4 bytes */
                    unsigned ac : 4;
                    unsigned : 4;
                    unsigned clock : 1;
                    unsigned : 0;
                    unsigned flag : 1;
           }) foo).count = 3;
  </code></pre>
  
  <p>... or something along these lines. </p>
  
  <p>Thanks!</p>