### warn_hiddenlocals

Controls the recognition of a local variable that hides another local variable.

##### Syntax

#pragma warn_hiddenlocals on | off | reset

##### Targets

All platforms.

##### Remarks

When on, the compiler issues a warning when it encounters a local variable that hides another local variable. An example appears in Listing 10.36.

#### Listing 10.36 Example of hidden local variables warning

#pragma warn_hiddenlocals on

void foo(int a)
{
{
int a;
}
} // generates a warning: object ’a’ hidden by
// local declaration

This pragma does not correspond to any panel setting. To check this setting, use __option (warn_hiddenlocals), described in Checking Settings. The default setting is off.