title: Understanding the C11 type hierarchy
body: <p>I would like to fully understand type hierarchy of the C11 language and present it graphically (a tree diagram would be perfect). The standard does not provide any figure for this issue – there are 30 points describing individual types and relations between them. I'd like to draw it.</p>
  
  <p>My attempt started from obtaining the <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf" rel="noreferrer">ISO/IEC 9899:201x Committee Draft N1570</a> and extracting all the essential statements from section 6.2.5 of the document. Then, I started to rearrange the knowledge in a form of a tree. Let me present my work in two steps.</p>
  
  <h3>Step 1: points 1–15</h3>
  
  <p>The extracted knowledge (point within section 6.2.5 + specified production):</p>
  
  <ul>
  <li>1 <em>types</em> = <em>object types</em> + <em>function types</em>;</li>
  <li>4 <em>standard signed integer types</em> = <code>signed char</code>, <code>short int</code>, <code>int</code>, <code>long int</code>, <code>long long int</code>;</li>
  <li>4 <em>signed integer types</em> = standard signed integer types + <em>extended signed integer types</em>;</li>
  <li>6 <em>standard unsigned integer types</em> = <code>_Bool</code>, <code>unsigned char</code>, <code>unsigned short int</code>, <code>unsigned int</code>, <code>unsigned long int</code>, <code>unsigned long long int</code>;</li>
  <li>6 <em>unsigned integer types</em> = standard unsigned integer types + <em>extended unsigned integer types</em>;</li>
  <li>7 <em>standard integer types</em> = standard signed integer types + standard unsigned integer types;</li>
  <li>7 <em>extended integer types</em> = extended signed integer types + extended unsigned integer types;</li>
  <li>10 <em>real floating types</em> = <code>float</code>, <code>double</code>, <code>long double</code>;</li>
  <li>11 <em>complex types</em> = <code>float _Complex</code>, <code>double _Complex</code>, <code>long double _Complex</code>;</li>
  <li>12 <em>floating types</em> = real floating types + complex types;</li>
  <li>14 <em>basic types</em> = <code>char</code> + signed integer types + unsigned integer types + floating types;</li>
  <li>15 <em>character types</em> = <code>char</code>, <code>signed char</code>, <code>unsigned char</code>.</li>
  </ul>
  
  <p>And the resulting structure:</p>
  
  <pre><code>types
      object types
      function types
  basic types
      char
      sίgned integer types
          standard sίgned integer types
              signed char, short int, int, long int, long long int
          extended sίgned integer types
      unsίgned integer types
          standard unsίgned integer types
              _Bool, unsigned char, unsigned short int, unsigned int,
              unsigned long int, unsigned long long int
          extended unsίgned integer types
      floating types
          real floating types
              float, double, long double
          complex types
              float _Complex, double _Complex, long double _Complex
  standard integer types
      standard sίgned integer types
      standard unsίgned integer types
  extended integer types
      extended sίgned integer types
      extended unsίgned integer types
  character types
      char, signed char, unsigned char
  </code></pre>
  
  <h3>Step 2: points 16–24</h3>
  
  <p>The remaining statements:</p>
  
  <ul>
  <li>16 <em>enumerated types</em>;</li>
  <li>17 <em>integer types</em> = <code>char</code> + signed integer types + unsigned integer types + enumerated types;</li>
  <li>17 <em>real types</em> = integer types + real floating types;</li>
  <li>18 <em>arithmetic types</em> = integer types + floating types;</li>
  <li>20 <em>derived types</em> = <em>array types</em>, <em>structure types</em>, <em>union types</em>, <em>function types</em>, <em>pointer types</em>, <em>atomic types</em>;</li>
  <li>21 <em>scalar types</em> =  arithmetic types + pointer types;</li>
  <li>21 <em>aggregate types</em> = array types + structure types;</li>
  <li>24 <em>derived declarator types</em> = array types + function types + pointer types.</li>
  </ul>
  
  <p>And the final C11 type system structure:</p>
  
  <pre><code>types
      object types
      function types
  basic types
      char
      sίgned integer types
          standard sίgned integer types
              signed char, short int, int, long int, long long int
          extended sίgned integer types
      unsίgned integer types
          standard unsίgned integer types
              _Bool, unsigned char, unsigned short int, unsigned int,
              unsigned long int, unsigned long long int
          extended unsίgned integer types
      floating types
          real floating types
              float, double, long double
          complex types
              float _Complex, double _Complex, long double _Complex
  standard integer types
      standard sίgned integer types
      standard unsίgned integer types
  extended integer types
      extended sίgned integer types
      extended unsίgned integer types
  character types
      char, signed char, unsigned char
  real types
      integer types
          char
          sίgned integer types
              standard sίgned integer types
                  signed char, short int, int, long int, long long int
              extended sίgned integer types
          unsίgned integer types
              standard unsίgned integer types
                  _Bool, unsigned char, unsigned short int, unsigned int,
                  unsigned long int, unsigned long long int
              extended unsίgned integer types
          enumeration  types
      real floating types
          float, double, long double
  scalar types
      arithmetic types
          integer types
              char
              sίgned integer types
                  standard sίgned integer types
                      signed char, short int, int, long int, long long int
                  extended sίgned integer types
              unsίgned integer types
                  standard unsίgned integer types
                      _Bool, unsigned char, unsigned short int, unsigned int,
                      unsigned long int, unsigned long long int
                  extended unsίgned integer types
              enumeration  types
          floating types
              real floating types
                  float, double, long double
              complex types
                  float _Complex, double _Complex, long double _Complex
      pointer types
  derived types
      array types
      structure types
      unίon types
      function types
      pointer types
      atomic types
  aggregate types
      array type
      structure type
  derived declarator types
      array type
      structure type
      pointer type
  </code></pre>
  
  <p>Now I need to reduce the structure (ideally to a single tree) or find a more tricky way to represent the relations. I would like to came out with a nice cheet-sheet for the C11 typing system. Any ideas?</p>