Declaration Statements

Declaration statements introduce new names into the current scope. These names can be:

Syntax

declaration-statement:

declaration

If a declaration within a block introduces a name that is already declared outside the block, the previous declaration is hidden for the duration of the block. After termination of the block, the previous declaration is again visible.

Multiple declarations of the same name in the same block are illegal.

For more information about declarations and name hiding, see Declarations and Definitions and Scope in Chapter 2.