NetBSD Problem Report #22019
Received: (qmail 14608 invoked by uid 605); 30 Jun 2003 13:49:40 -0000
Message-Id: <xof7k73n09e.fsf@blubb.pdc.kth.se>
Date: 30 Jun 2003 15:49:33 +0200
From: joda@pdc.kth.se (Johan Danielsson)
Sender: gnats-bugs-owner@netbsd.org
Reply-To: joda@pdc.kth.se
To: gnats-bugs@gnats.netbsd.org
Subject: printf C99 conformance with %#.o
X-Send-Pr-Version: 3.95
>Number: 22019
>Category: lib
>Synopsis: printf C99 conformance with %#.o
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 30 13:50:02 +0000 2003
>Closed-Date: Sun Mar 18 08:14:16 +0000 2012
>Last-Modified: Sun Mar 18 08:15:02 +0000 2012
>Originator: Johan Danielsson
>Release: NetBSD 1.6T
>Organization:
>Environment:
<The following information is extracted from your kernel. Please>
<append output of "ldd", "ident" where relevant (multiple lines).>
System: NetBSD blubb.pdc.kth.se 1.6T NetBSD 1.6T (BLUBB) #531: Thu May 29 13:09:25 CEST 2003 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/netbsd-cvs/src/sys/arch/i386/compile/BLUBB i386
Architecture: i386
Machine: i386
>Description:
Currently printf("%#.o", 0) produces the empty string (""), and this
is correct in terms of C89, but C99 includes this piece of text: "if
the value and precision are both 0, a single 0 is printed". This
indicates that the output should be "0".
But I'm not sure I think this makes much sense. For instance "%#.x"
would still result in "".
So either we should fix printf to comply with C99, or we should decide
that this is just rubbish. I have not seen a rationale for C99, so I
don't know why this change was made.
>How-To-Repeat:
#include <stdio.h>
main()
{
printf("|%#.o|\n", 0);
}
>Fix:
None supplied.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Sun, 18 Mar 2012 08:14:16 +0000
State-Changed-Why:
This has been fixed.
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/22019 CVS commit: src/tests/lib/libc/stdio
Date: Sun, 18 Mar 2012 08:13:57 +0000
Module Name: src
Committed By: jruoho
Date: Sun Mar 18 08:13:57 UTC 2012
Modified Files:
src/tests/lib/libc/stdio: t_printf.c
Log Message:
Verify that PR lib/22019 is no longer an issue.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/stdio/t_printf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
<Please check that the above is correct for the bug being reported,>
<and append source date of snapshot, if applicable (one line).>
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.