This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
scanf non-conformance
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: scanf non-conformance
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 15 Aug 2000 11:40:48 +0100 (BST)
Ulrich will already be aware of this, but it should probably be noted:
glibc's scanf conforms to neither the 1990 nor the 1999 C standard. It
doesn't conform to the 1990 standard because of the additional floating
point forms (hex floats, infinities and NaNs) recognised as per C99; it
doesn't conform to the 1999 standard because of the %as kludge (the GNU
%as extension being incompatible with %a as a floating-point
format). Properly fixing this would require redirecting the scanf
functions to other functions if strict conformance to either standard
version is selected (by -std=c89 or -std=c99 without _GNU_SOURCE).
(I expect in any case at some point to make gcc's format checking follow
the standard rather than glibc for scanf %as in C99 mode.)
--
Joseph S. Myers
jsm28@cam.ac.uk