This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix PR/44128 (C++ not warn on type decl shadowing with -Wshadow)
On Sun, Jun 13, 2010 at 3:34 AM, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> On Thu, 10 Jun 2010, Le-Chun Wu wrote:
>> -Warn whenever a local variable shadows another local variable, parameter or
>> -global variable or whenever a built-in function is shadowed.
>> +Warn whenever a local variable or type declaration shadows another variable,
>> +parameter, type, or class member (in C++), or whenever a built-in function
>> +is shadowed. Note that in C++, the compiler will not warn if a local variable
>> +shadows a struct/class/enum, but will warn if shadows an explicit typedef.
>
> "warn if it shadows"
Will fix.
>
> When this goes in, it will be nice could you add an update to
> gcc-4.6/changes.html, too, since this will be user visible.
>
Will do.
I will prepare a revised patch with the above fixes. Thanks,
Le-chun