Spurious printf '$' conversion warnings

From: Brian Buchanan <brian_at_ncircle.com>
Date: Thu, 8 May 2003 09:47:21 -0700 (PDT)
gcc on -CURRENT is giving spurious warnings for format strings with dollar
fields:

test.c:
#include <stdio.h>

int
main(void) {
  printf("%s %1$s\n", "foo");

  return (0);
}

> gcc -Wformat test.c
test.c: In function `main':
test.c:5: warning: unknown conversion type character `$' in format

> ./a.out
foo foo

> gcc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.2.2 [FreeBSD] 20030205 (release)


Anyone have insight into this?  I'm unfortunately not familiar enough with
the gcc source to track it down easily.

-Brian
Received on Thu May 08 2003 - 07:57:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:07 UTC