Hello community, here is the log from the commit of package gawk checked in at Wed Jul 5 12:41:50 CEST 2006. -------- --- gawk/gawk.changes 2006-07-04 10:56:39.000000000 +0200 +++ gawk/gawk.changes 2006-07-05 10:51:52.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Jul 5 10:51:33 CEST 2006 - schwab@suse.de + +- Fix conversion error. + +------------------------------------------------------------------- New: ---- numeric-conversion.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gawk.spec ++++++ --- /var/tmp/diff_new_pack.bLATIW/_old 2006-07-05 12:41:33.000000000 +0200 +++ /var/tmp/diff_new_pack.bLATIW/_new 2006-07-05 12:41:33.000000000 +0200 @@ -19,7 +19,7 @@ Autoreqprov: on PreReq: %{install_info_prereq} Version: 3.1.5 -Release: 19 +Release: 20 Summary: GNU awk Source: gawk-%{version}.tar.bz2 Patch: gawk-%{version}.diff @@ -31,6 +31,7 @@ Patch7: wconcat2.diff Patch8: sub-common.diff Patch9: dev-fd.diff +Patch10: numeric-conversion.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -82,11 +83,11 @@ %patch7 %patch8 %patch9 +%patch10 rm -f regex.[ch] %build %{suse_update_config -f} -rm -f acinclude.m4 autoreconf --force --install export CFLAGS=$RPM_OPT_FLAGS ./configure --prefix=/usr --libexecdir=%{_libdir} \ @@ -154,6 +155,8 @@ %doc doc/igawk.1.ps.gz %changelog -n gawk +* Wed Jul 05 2006 - schwab@suse.de +- Fix conversion error. * Tue Jul 04 2006 - schwab@suse.de - New version of last change. * Sun Jun 18 2006 - schwab@suse.de ++++++ numeric-conversion.diff ++++++
From nobody Wed Jul 5 10:39:02 2006 From: Aharon Robbins
Subject: Re: conversion error To: bug-gawk@gnu.org, Heiner.Marxen@DrB.Insel.DE Cc: Date: Tue, 04 Jul 2006 22:46:47 +0300
Greetings. Re this:
Date: Tue, 04 Jul 2006 21:06:14 +0200 (MEST) From: Heiner Marxen
Subject: conversion error To: bug-gawk@gnu.org Hello,
The following awk script fails for gawk 3.1.4 and 3.1.5. Older versions did not do this, but I cannot say, how old they were.
BEGIN { if( 0 ) { #ok t = "8" }else { #fails t = "" t = t "8" } printf("8 = %d\n", 0+t) # ok without this line t = t "8" # does not invalidate numeric interpretation printf("88 = %s\n", 0+t) ## The above prints "88 = 8" with gawk 3.1.4 and 3.1.5 }
The following one-liner already exhibits the bug:
gawk 'BEGIN{t=""; t=t "8";printf("8=%d\n", 0+t);t=t "8";printf("88=%s\n", 0+t)}'
Preliminary observation: under somewhat strange conditions a variable does retain its numeric interpretation although something is appended to it. -- Heiner Marxen http://www.drb.insel.de/~heiner/
This is an excellent bug report and test case. Much thanks. The following
patch fixes the problem.
Arnold
----------------------------------------------------
Tue Jul 4 22:43:05 2006 Arnold D. Robbins