This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: scanf non-conformance
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: Re: scanf non-conformance
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 15 Aug 2000 19:01:22 +0100 (BST)
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