Date: Tue, 01 Jul 1997 13:31:25 -0700 From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG, jkh@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdio scanf.3 vfscanf.c Message-ID: <925.867789085@time.cdrom.com> In-Reply-To: Your message of "Wed, 02 Jul 1997 06:05:39 %2B1000." <199707012005.GAA02012@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> I had this patch in my "needs more work" basket. Its use of strtoq() and Well, maybe now that it's in the tree and open to wider scrutiny, somebody can actually push David D. in the direction of greater "undefined compatibility" :-) Jordan > strtouq() for ints and longs is inefficient in all cases and incompatible > in overflow cases. The behaviour in overflow cases seems to be undefined, > so it isn't a bug that the submitted patch would change the result read > by sscanf("4294967296", "%ld", &foo) from INT_MAX to 0 (for 32-bit ints), > it is just incompatible. > > The int vs long case was already poorly handled by using strtol() and > strtoul() for ints. > > Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?925.867789085>