[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk: "please file a bug report"
From: |
arnold |
Subject: |
Re: gawk: "please file a bug report" |
Date: |
Wed, 11 Aug 2021 22:56:45 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
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'
> #-----------------------------------------