From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Terbeck Newsgroups: gmane.lisp.guile.bugs Subject: bug#18299: Analyzer issues warning with ~:p expansion of =?UTF-8?Q?=E2=80=98format=E2=80=99?= Date: Wed, 20 Aug 2014 14:26:34 +0200 Message-ID: <87ha17gxdx.fsf@ft.bewatermyfriend.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1408537894 3823 80.91.229.3 (20 Aug 2014 12:31:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2014 12:31:34 +0000 (UTC) To: 18299@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Aug 20 14:31:26 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XK52z-0001hS-OL for guile-bugs@m.gmane.org; Wed, 20 Aug 2014 14:31:25 +0200 Original-Received: from localhost ([::1]:55525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK52z-0000Wg-CY for guile-bugs@m.gmane.org; Wed, 20 Aug 2014 08:31:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK52n-0000VB-0J for bug-guile@gnu.org; Wed, 20 Aug 2014 08:31:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK52c-0000jc-VI for bug-guile@gnu.org; Wed, 20 Aug 2014 08:31:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK52c-0000jY-Rs for bug-guile@gnu.org; Wed, 20 Aug 2014 08:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XK52c-0003fv-G6 for bug-guile@gnu.org; Wed, 20 Aug 2014 08:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Frank Terbeck Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 20 Aug 2014 12:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18299 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140853782014072 (code B ref -1); Wed, 20 Aug 2014 12:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Aug 2014 12:30:20 +0000 Original-Received: from localhost ([127.0.0.1]:48080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK51v-0003eu-Pg for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:30:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47646) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK51r-0003eb-Pp for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:30:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK51c-0008Pn-Ho for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:30:10 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK51c-0008Pi-Ec for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:30:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK51U-0000Lf-OH for bug-guile@gnu.org; Wed, 20 Aug 2014 08:30:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK51N-0008OQ-84 for bug-guile@gnu.org; Wed, 20 Aug 2014 08:29:52 -0400 Original-Received: from smtprelay01.ispgateway.de ([80.67.31.35]:44077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK51N-0008OH-1U for bug-guile@gnu.org; Wed, 20 Aug 2014 08:29:45 -0400 Original-Received: from [149.201.42.237] (helo=jim.voodoo.lan) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1XK51K-0008Qj-UM for bug-guile@gnu.org; Wed, 20 Aug 2014 14:29:42 +0200 Original-Received: by jim.voodoo.lan (Postfix, from userid 1000) id 1BD2697690; Wed, 20 Aug 2014 14:26:35 +0200 (CEST) User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-Df-Sender: NDMwNDQ0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7540 Archived-At: Hello Guile developers, I was trying this: (use-modules (ice-9 format)) (format #t "~d block~:p~%" 1) ;; and 0, and 2 etc... =20=20 This triggers a warning about the format-string argument count: ;;; :3:0: warning: "~d block~:p~%": wrong number of `format' arguments: expected 2, got 1 The manual says this about "~:p": ~:p re-uses the preceding argument instead of taking a new one, which can be convenient when printing some sort of count. (format #t "~d cat~:p" 9) =E2=8A=A3 9 cats (format #t "~d pupp~:@p" 5) =E2=8A=A3 5 puppies I was looking at the code, and it appears that the warning is triggered in "module/language/tree-il/analyze.scm" in =E2=80=98format-analysis=E2=80= =99 and more precisely in =E2=80=98check-format-args=E2=80=99, due to the lack of suppor= t for "~:p" and presumably "~:@p" in =E2=80=98format-string-argument-count=E2=80=99. Regards, Frank --=20 In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925