bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] How to enable -L fatal but disable the shadow warnings?


From: Aharon Robbins
Subject: Re: [bug-gawk] How to enable -L fatal but disable the shadow warnings?
Date: Wed, 17 Oct 2012 23:11:28 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Greetings. Re this:

> From: Peng Yu <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] How to enable -L fatal but disable the shadow warnings?
>
> Hi,
>
> -L fatal is sometimes useful. But it always warns shadowed variables,
> which is not necessarily useful, because these variables are
> intentionally shadowed in functions in most of cases. Is there a way
> to disable these shadow warnings while keep -L fatal on?

There is no way at the moment, short of modifying the gawk source code.
You can either just -L without the `fatal' and just fix what it warns about,
or change the names of the parameters in your functions.

It has been my experience that shadowing is bad, particularly for simple
variable names like `x' and `i', and I recommend that you avoid it.

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]