scanf non-conformance

Joseph S. Myers jsm28@cam.ac.uk
Tue Aug 15 11:01:00 GMT 2000


On 15 Aug 2000, Ulrich Drepper wrote:

> Kaz Kylheku <kaz@ashi.footprints.net> writes:
> 
> > Recognizing additional conversion specifiers is permitted in a
> > conforming C90 scanf implementation. I believe that the behavior of
> > using these is undefined; so it is the program that uses these
> > extensions that fails to be strictly conforming.
> 
> Using uppercase characters for new formats and modifiers is allowed.
> The a modifier violates this rule.

Of course C99 broke the rules given in C90 by adding some uppercase
specifiers itself.

As noted %as is only an issue for C99 programs wishing to read a floating
point number (with the %a specifier rather than any of the other 7
synonymous specifiers available) followed by an 's'.  The C90 issue is the
same as Ulrich has noted on the Austin Group list for strtod: C90 does not
allow for additional forms of numbers to be recognised in the "C" locale.

Perhaps something on technical non-compliance issues should go in BUGS or
CONFORMANCE.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Libc-alpha mailing list