This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gawk 4.1.3: warning: gensub: third argument


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]