6.7.2 Type specifiers

Previous Table of Contents "New C Standard" commentary

1378

type-specifier:
                void
                char
                short
                int
                long
                float
                double
                signed
                unsigned
                _Bool
                _Complex
                _Imaginary
                struct-or-union-specifier
                enum-specifier
                typedef-name

1379 At least one type specifier shall be given in the declaration specifiers in each declaration, and in the specifier-qualifier list in each struct declaration and type name.

1380 Each list of type specifiers shall be one of the following sets (delimited by commas, when there is more than one set on a line);

1381 the type specifiers may occur in any order, possibly intermixed with the other declaration specifiers.

1382

—   void
—   char
—   signed char
—   unsigned char
—   short, signed short, short int, or signed short int
—   unsigned short, or unsigned short int
—   int, signed, or signed int
—   unsigned, or unsigned int
—   long, signed long, long int, or signed long int
—   unsigned long, or unsigned long int
—   long long, signed long long, long long int, or signed long long int
—   unsigned long long, or unsigned long long int
—   float
—   double
—   long double
—   _Bool
—   float _Complex
—   double _Complex
—   long double _Complex
—  float _Imaginary
—  double _Imaginary
—  long double _Imaginary
—   struct or union specifier
—   enum specifier
—   typedef name

1383 The type specifiers _Complex and _Imaginary shall not be used if the implementation does not provide those complex types.102)

1384 Specifiers for structures, unions, and enumerations are discussed in 6.7.2.1 through 6.7.2.3.

1385 Declarations of typedef names are discussed in 6.7.7.

1386 The characteristics of the other types are discussed in 6.2.5.

1387 Each of the comma-separated sets designates the same type, except that for bit-fields, it is implementation-defined whether the specifier int designates the same type as signed int or the same type as unsigned int.

1388 102) 101)Implementations are not required to provide imaginary types. Freestanding implementations are not required to provide complex types.

1389 Forward references: enumeration specifiers (6.7.2.2), structure and union specifiers (6.7.2.1), tags (6.7.2.3), type definitions (6.7.7).

Next

Created at: 2008-01-30 02:39:43 The text from WG14/N1256 is copyright © ISO