From owner-cvs-all Fri May 24 12:27:23 2002 Delivered-To: cvs-all@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id 74FDB37B40A; Fri, 24 May 2002 12:27:15 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g4OJRF143309; Fri, 24 May 2002 12:27:15 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id DC2033807; Fri, 24 May 2002 12:27:14 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "David E. O'Brien" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/contrib/gcc c-format.c In-Reply-To: <200205221637.g4MGb9e63421@freefall.freebsd.org> Date: Fri, 24 May 2002 12:27:14 -0700 From: Peter Wemm Message-Id: <20020524192714.DC2033807@overcee.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "David E. O'Brien" wrote: > obrien 2002/05/22 09:37:09 PDT > > Modified files: > contrib/gcc c-format.c > Log: > 1/2assed reimplementation of c-common.c revs 1.2 (-fformat-extensions) > and 1.3 (printf0) for GCC 3.1. This is not quite right: peter@overcee[12:24pm]/tmp-169> cat foo.c int main(int ac, char **av) { printf("%6D\n", (unsigned char *)"fake", ":"); return 0; } peter@overcee[12:24pm]/tmp-170> cc -c -Wformat -c foo.c foo.c: In function `main': foo.c:5: warning: too many arguments for format peter@overcee[12:25pm]/tmp-172> cat foo.c int main(int ac, char **av) { printf("%D\n", (unsigned char *)"fake", ":"); return 0; } peter@overcee[12:25pm]/tmp-173> cc -c -Wformat -c foo.c peter@overcee[12:25pm]/tmp-174> ie: it doesn't seem to like the size argument, which is clearly documented in the comments and well used in the kernel. eg: ../../../dev/an/if_an.c: In function `an_attach': ../../../dev/an/if_an.c:444: warning: too many arguments for format Also: ../../../kern/tty_pty.c: In function `ptyinit': ../../../kern/tty_pty.c:158: warning: use of `' length modifier with `r' type character ../../../kern/tty_pty.c: In function `pty_clone': ../../../kern/tty_pty.c:860: warning: use of `' length modifier with `r' type character I think this is the opposite problem to above. %r appears to require a size argument in the checking while %D appears to prohibit one. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message