scanf non-conformance
Joseph S. Myers
jsm28@cam.ac.uk
Tue Aug 15 03:41:00 GMT 2000
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
More information about the Libc-alpha
mailing list