bug-gawk
[Top][All Lists]
Advanced

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

Re: gawk: "please file a bug report"


From: Denis Shirokov
Subject: Re: gawk: "please file a bug report"
Date: Thu, 12 Aug 2021 22:29:48 +0300

Hi!

I've encountered this error many times but could never find a
reproduce script. I can only say that it was never related to gensub,
gsub or sub. and it was definitely not related to the strong regexp
datatype.

sometimes the elements of an array determinated by typeof() as unknown
and thats all what i know about it.

Kind Regrds
Denis

2021-08-12 7:56 GMT+03:00, arnold@skeeve.com <arnold@skeeve.com>:
> Hi.
>
> Thanks for the bug report. I am working on this. I have to think about
> how to clean out some of the dark corners with gensub(). (sub, gsub, and
> gensub share some common code.)
>
> I will post a patch when I'm done.
>
> Thanks!
>
> Arnold
>
> J Naman <jnaman2@gmail.com> wrote:
>
>> Sorry, just exploring in dark corridors ... gsub() *target*: @strong
>> regex.
>> Feel free to use/not use this in a future gawk_source\gawk-master\test
>> -john naman gawker@703n.com
>>
>> gawk: C:\Nsoft\@nsLib\dev\TESTquickRgxGsub.Tr2.awk:8: warning: typeof
>> detected invalid flags combination `MALLOC|STRING|STRCUR|NUMCUR|REGEX';
>> please file a bug report.
>>
>> BEGIN{
>> print "Initialize strong regex"
>> rgx2=rgx1=@/[abc]/
>> printf("rgx%d='%s'\ttypeof(rgx%d)='%s'\n",1,rgx1,1,typeof(rgx1));
>> printf("rgx%d='%s'\ttypeof(rgx%d)='%s'\n",2,rgx2,2,typeof(rgx2));
>> print "Test gsub() a strong regex"
>> gsub(/b/,"e",rgx2);
>> printf("rgx%d='%s'\ttypeof(rgx%d)='%s'\n",1,rgx1,1,typeof(rgx1));   #<
>> line
>> 8 warning
>> printf("rgx%d='%s'\ttypeof(rgx%d)='%s'\n",2,rgx2,2,typeof(rgx2));
>> }
>> #========================================
>> Stdout:
>> Initialize strong regex
>> rgx1='[abc]' typeof(rgx1)='regexp'
>> rgx2='[abc]' typeof(rgx2)='regexp'
>> Test gsub() a strong regex
>> rgx1='[abc]' typeof(rgx1)='unknown'        #< line 8 warning
>> rgx2='[aec]' typeof(rgx2)='string'
>> #-----------------------------------------
>
>



reply via email to

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