title: Why do bit fields in C need to be defined of type unsigned int or signed int
body: <p>I was running code quality check on my C project, which involves structures with bit fields. I came across a situation which, as per MISRA C 2004 standards, rule # 6.4 - is a violation, that reads as follows:
  "6.4 Bit fields shall only be defined to be of type unsigned int or signed int."
  Literature available on Microsoft Developer Network <a href="http://msdn.microsoft.com/en-us/library/yszfawxh.aspx" rel="nofollow">here</a> asserts this. 
  Can anyone explain as to why the datatypes of the bitfield member needs to be signed or unsigned int? Why am I not allowed to do the following, even though, the following code would compile with no warnings:</p>
  
  <pre><code>typedef struct
  {
      char a: 4;
      char b: 4;
      char flag: 1;
  }MY_STRUCT
  </code></pre>