public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: peio@blutch.dyndns.org
To: gcc-gnats@gcc.gnu.org
Cc: prpetit@canal-plus.com
Subject: c/6547: misleading printf '$' format
Date: Fri, 03 May 2002 06:06:00 -0000	[thread overview]
Message-ID: <20020503130215.21459.qmail@sources.redhat.com> (raw)


>Number:         6547
>Category:       c
>Synopsis:       misleading printf '$' format
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 03 06:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Pierre PETIT
>Release:        gcc version 3.0.4 (and 2.95.4)
>Organization:
>Environment:
Debian GNU/Linux (testing) x86
Linux kernel 2.4.18 - libc v2.2.5
>Description:
Formats with '$' character get a warning on gcc-3.0,
when compiling with -Wall (or at least -Wformat):
"warning: unknown conversion type character '$' in format"

With both v2.95 and 3.0, there is a warning on "%.*1$s":
"warning: unknown conversion type character '1' in format"
>How-To-Repeat:
#include <stdio.h>

int main (int argc, char *argv[]) {
  printf("%.*s == %2$.*1$s\n", argc, *argv);
  return 0;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-05-03 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-03  6:06 peio [this message]
2002-05-03  6:56 Joseph S. Myers
2002-05-03  7:26 Pierre-Canalsat PETIT
2002-05-03 13:26 Joseph S. Myers
2002-08-23 13:16 jsm28

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020503130215.21459.qmail@sources.redhat.com \
    --to=peio@blutch.dyndns.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=prpetit@canal-plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).