Spurious printf '$' conversion warnings
Brian Buchanan
brian at ncircle.com
Thu May 8 09:57:56 PDT 2003
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
More information about the freebsd-current
mailing list