GNU bug report logs - #8532
FAIL: cp/sparse-fiemap

Previous Next

Package: coreutils;

Reported by: dclarke <at> blastwave.org

Date: Thu, 21 Apr 2011 17:38:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: jim <at> meyering.net (Jim Meyering)
Cc: 8532 <at> debbugs.gnu.org, dclarke <at> blastwave.org
Subject: bug#8532: FAIL: cp/sparse-fiemap
Date: Fri, 22 Apr 2011 04:43:33 -0500 (GMT+5)
Jim Meyering writes:
> 
> Alan Curry wrote:
> >
> > Parenthesizing the ternary expression makes it happy again.
> >
> >> BTW, that syntax works for me using the latest gawk with or without -W c=
> ompat,
> >> and with the mawk and nawk programs from debian unstable.
> >
> > apt-get install original-awk
> 
> Thanks.
> This patch fixes it, and I've closed the ticket.
> 
> Alan, I'll wait for you to "ack" before pushing it,
> since I've listed you as the author.

Yeah, it looks right.

I looked over the POSIX grammar for awk and I believe it requires some
parentheses here, either around the whole ternary expression or around the
comparison part of it. The key is the difference between non_unary_expr and
non_unary_print_expr. The "print" version is in effect wherever a
redirection operator might appear, and it doesn't have any of the 6
comparison operators < = > <= >= !=

The ability to do a comparison (other than '>') without parentheses in
an argument to print is an extension. From a quick peek at the gawk
ChangeLog I'd guess that it happened here:

Sun Feb  2 15:32:42 2003  Stepan Kasal  <kasal <at> math.cas.cz>
[...]
        The redirection of print statements reworked.  The idea comes from
        mawk-1.3.3; much thanks to Michael Brennan!

which puts it between gawk 3.1.1 and 3.1.2.

I noticed that Dennis Clarke reports he's using gawk 3.0.1 out of
/usr/local/bin on a Debian squeeze system, which should have gawk 3.1.7
in /usr/bin. Seems like an odd thing to do. Installed the local version
a long time ago and forgot to remove it when the version in /usr/bin
surpassed it? Something like that has happened to me at least once
before.

-- 
Alan Curry




This bug report was last modified 14 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.