Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The cluttered structure of C11 types resulting from the second step of the question can be simplified by removal/reduction of less important nodes and delegating some redundant/subsidiary information to be presented by other means.</p> <p>I propose the following five-step algorithm for that:</p> <ol> <li>Removal of all <em>extended</em> integer types (strictly conforming implementation assumed);</li> <li>Reduction of the <em>standard</em> integer types (as they do not partition types any more);</li> <li>Grouping the structure: <ol> <li>A <em>scalar types</em> vs <em>aggregate types</em> pair of sub-trees (represented as a tree),</li> <li>A <em>basic types</em> vs <em>derived types</em> pair of sub-trees (represented by coloured regions),</li> <li><em>real types</em> and <em>derived declarator types</em> (represented as stroked sub-regions of these),</li> <li><em>character types</em> (represented with different text colour);</li> </ol></li> <li>Application of an off-standard production: <em>object types</em> = <em>scalar types</em> + <em>aggregate types</em>;</li> <li>Supplementing the <em>object types</em> of missing <em>union types</em> and <em>atomic types</em>.</li> </ol> <p>The resulting C11 type system summary looks as follows:</p> <p><a href="https://i.stack.imgur.com/f2dAp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f2dAp.png" alt="C11 type hierarchy"></a></p> <p>The grey stroke/areas are introduced to increase readability of the tree.</p> <p>The type summary does not include the concept of "type declaration completeness" because it is a state, observed at a particular point within a <em>translation unit</em>. At run-time, all objects and functions are instances of a <em>complete type</em>. The <code>void</code> type is an exception but, as a no-type (or any-type in case of a pointer), it is intentionally excluded from the diagram.</p> <p>The <code>const</code>, <code>volatile</code>, <code>restrict</code> and <code>_Atomic</code> are <em>type qualifiers</em> which, contrary to <em>type specifiers</em> for the <em>derived types</em>, cannot be applied recursively. Any combination of these may prepend any type definition (as long as it makes sense). Thus, including them in the diagram would complicate it, while not introducing any suitable information. The apparent exception makes the <code>_Atomic (type)</code> construct, which is taken into account as being a <em>type specifier</em> for the <em>atomic type</em> – one of the <em>derived types</em> listed in the C11 standard.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload