This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: Why this change?
- To: drepper@cygnus.com
- Subject: Re: Why this change?
- From: hjl@lucon.org (H.J. Lu)
- Date: Fri, 13 Nov 1998 19:01:26 -0800 (PST)
- Cc: libc-hacker@cygnus.com
>
> hjl@lucon.org (H.J. Lu) writes:
>
> > Could you please tell me why this change
> >
> > 1998-11-13 Ulrich Drepper <drepper@cygnus.com>
> >
> > * stdio-common/vfscanf.c: Return EOF for invalid format
> > characters.
> >
> > is needed? It breaks stdio-common/tstdiomisc.c. Do you have a testcase
> > for the bug you tried to fix?
>
> The problem is that some old code contains format specifiers which are
> invalid today. E.g., scanf ("%D", ...) used to be the same as "%ld".
> When we do not signal an error these kinds of errors stay unnoticed.
1. When did "%D" become invalid?
2. What should
sscanf ("12345", "%Z", &x)
return? Both Solaris and HP-UX return 0 when the format specifier is
invalid.
--
H.J. Lu (hjl@gnu.org)