Wshadow

Determines whether a warning is issued when a variable declaration hides a previous declaration.

Syntax

Linux OS and OS X:

-Wshadow

-Wno-shadow

Windows OS:

None

Arguments

None

Default

-Wno-shadow

No warning is issued when a variable declaration hides a previous declaration.

Description

This option determines whether a warning is issued when a variable declaration hides a previous declaration. Same as -ww1599.

IDE Equivalent

None

Alternate Options

None

如需更全面地了解编译器优化,请参阅优化注意事项