Go to the first, previous, next, last section, table of contents.


5.2.1 Storage Class Specifiers

The syntax of storage class specifiers is the same as in C++. (The keyword mutable is described in Section r.7.1.1 of [Stroustrup95]. It should only be applied to non-const and non-static data members of a class.)

storage-class-specifier ::= static | extern | mutable
        | auto | register

Declarations marked static are not made available by an import in Larch/C++.

Note that an object declaration such as

int x;

is a definition, but the addition of extern, as in the following,

extern int x;

turns it into a declaration (see section 2.5 Declarations and Definitions).

The linkage (see Section r.3.3 and r.7.1 of [Stroustrup91]) specified by static and extern is as in C++.

The only use for register would be to record an implementation design decision.


Go to the first, previous, next, last section, table of contents.