Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Specifiers

This topic describes the decl-specifiers (declaration specifiers) component of a declaration.

The following placeholders and language keywords are declaration specifiers:

storage-class-specifier

type-specifier

function-specifier

friend

typedef

__declspec ( extended-decl-modifier-seq )

The decl-specifiers part of a declaration is the longest sequence of decl-specifiers that can be taken to mean a type name, not including the pointer or reference modifiers. The remainder of the declaration is the declarator, which includes the name introduced.

The following table lists four declarations, and then lists each declaration's decl-specifers and declarator component separately.

Declaration

decl-specifiers

declarator

char *lpszAppName;

char

*lpszAppName

typedef char * LPSTR;

char

*LPSTR

const int func1();

const int

func1

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 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, especially typedef names.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.