GNU bug report logs -
#23110
seq apparent bug
Previous Next
Reported by: Маренков Евгений <hotpil <at> mail.ru>
Date: Thu, 24 Mar 2016 17:23:03 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 23110 <at> debbugs.gnu.org (full text, mbox):
On 04/08/2016 05:57 AM, Pádraig Brady wrote:
> Do we want to deal with these cases spinning the cpu,
> in further patches?
>
> seq 1 nan 1
NaN should be an error in any of the operands.
> seq 1 .0000000000000000000000000000001 1
For this I suggest the following heuristic. When inferring a format that
would apply to two or more lines of output, try formatting the first two
lines and report an error if they are the same. That would catch the
seeming infinite loop (and at any rate, inadequate output) in this example.
>
> As an aside, I see FreeBSD requires the STEP to be in the right direction
> when FIRST != LAST, or it will also exit with error.
> GNU will just output nothing in that case.
Outputting nothing sounds better. 'seq 1 0' is like 'for (i = 1; i <= 0;
i++) ...'
This bug report was last modified 6 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.