This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

scanf non-conformance


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]