GNU bug report logs -
#7214
sort --debug maps large old-style field number to 0 in diagnostic
Previous Next
Reported by: Jim Meyering <jim <at> meyering.net>
Date: Thu, 14 Oct 2010 10:03:02 UTC
Severity: normal
Tags: wontfix
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 7214 <at> debbugs.gnu.org (full text, mbox):
On 10/14/2010 06:19 AM, Pádraig Brady wrote:
> @@ -3882,6 +3882,8 @@ parse_field_count (char const *string, size_t *val, char const *msgid)
> case LONGINT_OVERFLOW:
> case LONGINT_OVERFLOW | LONGINT_INVALID_SUFFIX_CHAR:
> *val = SIZE_MAX;
> + if (debug) /* Note --debug must come before keys to diagnose this. */
> + error (0, 0, _("%" PRIuMAX " is too large, using %zu"), n, *val);
> break;
Rather than warn during option parsing, what if you instead set a bool
variable overflow_detected, and warn only after option parsing is
completed? The warning won't be quite as specific:
_("At least one key range overflowed")
but given that it's a corner case already, it means you would then have
warning for:
sort +$(((1<<31)-1)) --debug
Just a thought; I'm okay with whatever you eventually commit on this front.
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
This bug report was last modified 6 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.