6.7.1 Storage-class specifiers

Previous Table of Contents "New C Standard" commentary

1364

storage-class-specifier:
                typedef
                extern
                static
                auto
                register

1365 At most, one storage-class specifier may be given in the declaration specifiers in a declaration.100)

1366 The typedef specifier is called a “storage-class specifier” for syntactic convenience only;

1367 it is discussed in 6.7.7.

1368 The meanings of the various linkages and storage durations were discussed in 6.2.2 and 6.2.4.

1369 A declaration of an identifier for an object with storage-class specifier register suggests that access to the object be as fast as possible.

1370 The extent to which such suggestions are effective is implementation-defined.101)

1371 The declaration of an identifier for a function that has block scope shall have no explicit storage-class specifier other than extern.

1372 100) See “future language directions” (6.11.5).

1373 101) The implementation may treat any register declaration simply as an auto declaration.

1374 However, whether or not addressable storage is actually used, the address of any part of an object declared with storage-class specifier register cannot be computed, either explicitly (by use of the unary & operator as discussed in 6.5.3.2) or implicitly (by converting an array name to a pointer as discussed in 6.3.2.1).

1375 Thus, the only operator that can be applied to an array declared with storage-class specifier register is sizeof.

1376 If an aggregate or union object is declared with a storage-class specifier other than typedef, the properties resulting from the storage-class specifier, except with respect to linkage, also apply to the members of the object, and so on recursively for any aggregate or union member objects.

1377 Forward references: type definitions (6.7.7).

Next

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