This is the mail archive of the
cygwin
mailing list for the Cygwin project.
gawk 4.1.3: warning: gensub: third argument
- From: "Westlund, John A" <john dot a dot westlund at intel dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sat, 3 Oct 2015 04:59:07 +0000
- Subject: gawk 4.1.3: warning: gensub: third argument
- Authentication-results: sourceware.org; auth=none
I first noticed this issue after an update to gawk 4.1.3. If the third argument in a call to gensub is bogus a warning is generated where is used to silently pass through:
$ echo asdf | gawk '{print gensub(/a/,"b","")}'
gawk: cmd. line:1: (FILENAME=- FNR=1) warning: gensub: third argument `' treated as 1
bsdf
$ gawk -V
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.3, GNU MP 6.0.0)
Copyright (C) 1989, 1991-2015 Free Software Foundation.
On other gawk versions this is the behavior:
$ echo asdf | gawk '{print gensub(/a/,"b","")}'
Bsdf
Appears to be resolved by this patch:
https://www.sourceware.org/ml/libc-alpha/2015-08/msg00269.html
John
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple