This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR c/53066 Wshadow should not warn for shadowing an extern function


On Sun, Apr 22, 2012 at 11:00 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> As described by Linus here:

> Interestingly, the C++ FE does not warn for this case, but it is not
> very clear to me where this decision is taken.

C++'s type system does not make it very likely to get into the
troubles that -Wshadow was attempting to warn about (shadowing
on extern function by a local variable)  -- thanks god.

This particular behaviour of-Wshadow is entirely up to C folks to
have or not.  I would suspect that it is not as useful in C99 or C11
as it might be in C K&R or even C90.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]