This is the mail archive of the
mailing list for the glibc project.
Re: scanf conflict with conclusions of WG 14 Defect Report 017 Question 29
- From: Petter Reinholdtsen <pere at hungry dot com>
- To: mjn3 at codepoet dot org (Manuel Novoa III)
- Cc: libc-alpha at sources dot redhat dot com
- Date: 23 Nov 2003 12:42:02 +0100
- Subject: Re: scanf conflict with conclusions of WG 14 Defect Report 017 Question 29
- References: <20030916230127.GA31705@codepoet.org>
- Reply-by: Tue, 1 Jan 1801 04:37:40 +1000
[Manuel Novoa III, 2003-09-16]
> /* glibc scanf violates the behavior specified in Defect Report #022
> Question 29.
I tested this, and it failed. I tried to compile it on other UNIXes
as well, but all of them are lacking fmemopen(), so I was unable to
test it there.
On Linux, the output is
fscanf returned 1, ferror=0, feof=0, and the next fgetc returned '4'
Error: By the response to Defect Report #022 Question 29,
scanf should have returned 0 due to a matching failure!