6.7.1 Storage-class specifiers

Previous Table of Contents

1354

storage-class-specifier:
                typedef
                extern
                static
                auto
                register

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

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

1357 it is discussed in 6.7.7.

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

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

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

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

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

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

1364 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).

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

1366 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.

1367 Forward references: type definitions (6.7.7).

Next

Created at: 2005-06-29 02:19:01 The text from WG14/N1124 is copyright © ISO