bug-gawk
[Top][All Lists]
Advanced

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

Re: Assertion failed: pc->target_jmp != NULL, file interpret.h, line 446


From: Andrew J. Schorr
Subject: Re: Assertion failed: pc->target_jmp != NULL, file interpret.h, line 446
Date: Sat, 25 Dec 2021 11:10:06 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Sat, Dec 25, 2021 at 03:13:33AM +0200, Denis Shirokov wrote:
> # Hi GAWK Team!
> #
> # asertion failed :) ...
> 
> BEGIN{
> 
>       continue }                    # or break
> 
> 
> # Assertion failed: pc->target_jmp != NULL, file interpret.h, line 446
> #
> # GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.0.2, GNU MP 6.1.2)
> #
> # Windows 10x64

That's very odd. On my Linux system:

bash-4.4$ ./gawk --version| head -1
GNU Awk 5.1.1, API: 3.1 (GNU MPFR 3.1.6-p2, GNU MP 6.1.2)

bash-4.4$ ./gawk 'BEGIN {continue}'                                             
                                                            
gawk: cmd. line:1: error: `continue' is not allowed outside a loop
gawk: cmd. line:1: error: `continue' is not allowed outside a loop

> # i found it when i try to 'continue' or 'break' from inside a function
> # that is called from areas that are appropriated for 'continue' or 'break'
> # statements (meaning: switch-case area and all types of gawk's loops)
> #
> # the interest question is: is it possible if user may for example breaks
> # the loop that is implemented somewhere else? please see the following
> # example for better understanding what exactly i meaning:
> 
> BEGIN{
> 
>       while ( 1 )
> 
>             callfn() }
> 
>       func  callfn() {
> 
>             break }                 # 'break' statement successfully breaks 
> loop
>                                     # located in BEGIN area

bash-4.4$ ./gawk '
> BEGIN{
> 
>       while ( 1 )
> 
>             callfn() }
> 
>       func  callfn() {
> 
>             break }'
gawk: cmd. line:10: error: `break' is not allowed outside a loop or switch
gawk: cmd. line:10: error: `break' is not allowed outside a loop or switch

So I am surprised that the results are different on Windows. Is this
a Cygwin or MinGW build?

Regards,
Andy



reply via email to

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