This section explains the decl-specifiers portion of declarations. (The syntax for declarations is given at the beginning of this chapter.)
decl-specifier:
storage-class-specifier
type-specifier
fct-specifier
friend
typedef
decl-specifiers:
decl-specifiersoptdecl-specifier
The decl-specifiers portion of a declaration is the longest sequence of decl-specifiers that can be construed to be a type name. The remainder of the declaration is the name or names introduced. The examples in the following list illustrate this concept:
Declaration | decl-specifiers | name |
char __far *lpszAppName; | char__far *, lpszAppName | ||
typedef char __far * LPSTR; | char __far *, LPSTR | ||
LPSTR _fstrcpy( LPSTR, LPSTR ); | LPSTR | _fstrcpy | |
volatile void *pvvObj; | volatile void * | pvvObj |
Because signed, unsigned, long, and short all imply int, a typedef name following one of these keywords is taken to be a member of declarator-list, not of decl-specifiers.
Note :
Because a name can be redeclared, its interpretation is subject to the most recent declaration in the current scope. Redeclaration can affect how names are interpreted by the compiler, particularly typedef names.