* gawk 4.1.3: warning: gensub: third argument
@ 2015-10-03 4:59 Westlund, John A
2015-10-21 10:17 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Westlund, John A @ 2015-10-03 4:59 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gawk 4.1.3: warning: gensub: third argument
2015-10-03 4:59 gawk 4.1.3: warning: gensub: third argument Westlund, John A
@ 2015-10-21 10:17 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2015-10-21 10:17 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
On Oct 3 04:59, Westlund, John A wrote:
> 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
No, that's a patch in glibc to cope with the changed behaviour of gawk
4.1.3. The upstream change was intentional.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-21 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 4:59 gawk 4.1.3: warning: gensub: third argument Westlund, John A
2015-10-21 10:17 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).