[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] --lint=no-ext and multidimensional arrays
From: |
M |
Subject: |
Re: [bug-gawk] --lint=no-ext and multidimensional arrays |
Date: |
Mon, 01 Jul 2019 10:35:34 +0300 |
Right you are, FUNCTAB and SYMTAB too.
https://git.savannah.gnu.org/cgit/gawk.git/commit/?id=d74560a10b861f2a6342f07f459a34d38685e65c
You have fixed this before my colleagues and I noticed the corresponding
messages in our logs. )
We'll apply that patch too.
30.06.2019, 19:12, "M" <address@hidden>:
> Oh, I should have looked for these lines in the sources first.
> I've applied the patch, it seems to work fine.
> Thank you!
>
> _______________
>
> Yours respectfully,
> Mark Krauze
>
> 30.06.2019, 14:19, "address@hidden" <address@hidden>:
>> The patch I sent also takes care of indirect function calls.
>>
>> Arnold
>>
>> M <address@hidden> wrote:
>>
>>> Thank you for a quick fix!
>>>
>>> It seems that indirect function calls are the same case:
>>>
>>> $ cat test.awk
>>> BEGIN {
>>> test_test()
>>> func_name = "test_test"
>>> @func_name()
>>>
>>> exit
>>> }
>>>
>>> function test_test() {
>>> }
>>> $ /path/to/gawk --lint=no-ext --exec test.awk
>>> gawk: test.awk:4: warning: indirect function calls are a gawk extension
>>> $
>>>
>>> Other "ext-warnings" seem to be hidden correctly.
>>> _______________
>>>
>>> Yours respectfully,
>>> Mark Krauze
>>>
>>> 30.06.2019, 13:03, "address@hidden" <address@hidden>:
>>> > Hi. Thanks for the note.
>>> >
>>> > M <address@hidden> wrote:
>>> >
>>> >> ??Hello! When launched with the option --lint=no-ext, Gawk v5.0.1 still
>>> >> ??warns that multidimensional arrays are a gawk extension.
>>> >>
>>> >> ??How to reproduce:
>>> >>
>>> >> ??$ cat test.awk
>>> >> ??BEGIN {
>>> >> ????????a[1][2] = 3
>>> >>
>>> >> ????????exit
>>> >> ??}
>>> >> ??$ /path/to/gawk --lint=no-ext --exec test.awk
>>> >> ??gawk: test.awk:2: warning: multidimensional arrays are a gawk
>>> extension
>>> >> ??$
>>> >>
>>> >> ??Looks like a bug.
>>> >> ??_______________
>>> >>
>>> >> ??Yours respectfully,
>>> >> ??Mark Krauze
>>> >
>>> > Here is the fix.
>>> >
>>> > Thanks,
>>> >
>>> > Arnold
>>> > -------------------------------------------------
>>> > diff --git a/awkgram.y b/awkgram.y
>>> > index a940ac9d..beb775d9 100644
>>> > --- a/awkgram.y
>>> > +++ b/awkgram.y
>>> > @@ -1994,7 +1994,7 @@ func_call
>>> >
>>> > ??????????????????????????????????if (do_traditional || do_posix)
>>> > ??????????????????????????????????????????????????yyerror("%s", msg);
>>> > - else if (do_lint && ! warned) {
>>> > + else if (do_lint_extensions && ! warned) {
>>> > ??????????????????????????????????????????????????warned = true;
>>> > ??????????????????????????????????????????????????lintwarn("%s", msg);
>>> > ??????????????????????????????????}
>>> > @@ -3857,7 +3857,7 @@ retry:
>>> > ??????????????????????????????????if (c == '[') {
>>> > ??????????????????????????????????????????????????if (do_traditional)
>>> >
>>> ??????????????????????????????????????????????????????????????????fatal(_("multidimensional
>>> arrays are a gawk extension"));
>>> > - if (do_lint)
>>> > + if (do_lint_extensions)
>>> >
>>> ??????????????????????????????????????????????????????????????????lintwarn(_("multidimensional
>>> arrays are a gawk extension"));
>>> > ??????????????????????????????????????????????????yylval =
>>> GET_INSTRUCTION(Op_sub_array);
>>> > ??????????????????????????????????????????????????lasttok = ']';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-gawk] --lint=no-ext and multidimensional arrays,
M <=