bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk/master exits(?) after @include directive


From: Hermann Peifer
Subject: Re: [bug-gawk] gawk/master exits(?) after @include directive
Date: Fri, 28 Apr 2017 21:03:28 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 28.04.17 19:29, Andrew J. Schorr wrote:
> It is extremely surprising that you get different results than I do.
> Are you using the latest version of the master branch? This is the
> last commit:
>
> commit a3be85eec86d00c12e7f4b41a9e27794fbb479a6
> Author: Andrew J. Schorr <address@hidden>
> Date:   Wed Apr 26 11:32:18 2017 -0400
>
>     Fix bug where Node_regex was setting valref, and restore valref to 
> Node_val part of NODE union where it belongs.
>
Yes. To be on the safe side: I made a fresh clone which did not make any
difference:
$ git clone git://git.savannah.gnu.org/gawk.git

I can only repeat what I wrote earlier: the sample code works fine for
gawk/master up to: commit "84f33c8b... Really fix the 64 bit alignment
issue." The reported bug appears since the following commit: "09149c0...
Fix --source to be like 3.1.x and improve the doc."

More observations:

a) things work fine when running similar code on the command line

$ ./gawk -i walkarray 'BEGIN { print "Hello World!"}'
Hello World!

b) according to pretty-print: gawk/master exits after the first include
directive, as the ctime.awk code does not appear in the output, see below

==> test2.awk <==
@include "walkarray"
@include "ctime"
BEGIN { print "Hello World!"}

$  ./gawk -o- -f test2.awk

function walk_array(arr, name, i)
{
    for (i in arr) {
        if (isarray(arr[i])) {
            walk_array(arr[i], name "[" i "]")
        } else {
            printf "%s[%s] = %s\n", name, i, arr[i]
        }
    }
}







reply via email to

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