title: C and gcc error array subscript is above array bounds
body: <p>I have a to deal with a structure of a lib :</p>
  
  <pre><code>typedef struct {
     uint8_t   response_type;
     uint8_t   error_code;
     uint16_t sequence;
     uint32_t resource_id;
     uint16_t minor_code;
     uint8_t major_code;
     uint8_t pad0;
     uint32_t pad[5];
     uint32_t full_sequence;
  } a_structure;
  </code></pre>
  
  <p>my problem come from the pad[5] member of the structure that I don't really understand.
  I thougth this member can be used as the other member in function like that:</p>
  
  <pre><code>uint8_t get_response_type( a_structure * my_struct)
  {
     return my_struct-&gt;response_type;
  }
  </code></pre>
  
  <p>but this function:</p>
  
  <pre><code>uint32_t get_pad_5( a_structure * my_struct)
  {
     return my_struct-&gt;pad[5];
  }
  </code></pre>
  
  <p>generate warning in gcc</p>
  
  <blockquote>
    <p>error array subscript is above array bounds</p>
  </blockquote>
  
  <p>Can someone explain me what this means ?</p>
  
  <p>Thxs</p>