Next: , Previous: Constant declaration, Up: Input file format


5.14 Type declaration

Type declarations define new data types and associate a name (an identifier) with it. The typedef keyword can be used to name an existing type. The constructed types struct, union and enum also name the type they define. The syntax is the following:

 (54) type-dcl              ::= constructed-type
                              | "typedef" alias-list
                              | forward-dcl
 (55) constructed-type      ::= struct-type
                              | union-type
                              | enum-type
 (56) alias-list            ::= ( type-spec | alias-list "," ) declarator