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]

Re: gawk 4.1.3: warning: gensub: third argument

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:

No, that's a patch in glibc to cope with the changed behaviour of gawk
4.1.3.  The upstream change was intentional.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpIM1UkMNnaf.pgp
Description: PGP signature

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