[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gawk: "please file a bug report"
From: |
J Naman |
Subject: |
gawk: "please file a bug report" |
Date: |
Wed, 11 Aug 2021 22:44:47 -0400 |
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'
#-----------------------------------------
- gawk: "please file a bug report",
J Naman <=