Support for %d$c format specifier in diagnostics.c

Bonzini bonzini@gnu.org
Sat Jul 5 10:41:00 GMT 2003


> OK	    %1$d %3$c %2$s %6$d %5$s %4$c
>
> OK	    %d %s %c %6$d %5$s %4$c
>
> ambiguous   %d %s %c %6$d %s %4$c
>             1  2  3   4   5  6

Gary Vaughan, Bruce Korb and me's snprintfv would map

%d %s %c %6$d %s %4$c

to

%1$d %2$s %3$c %6$d %4$s %4$c

That is, keep a running counter of non $-ed specifiers.  I think this is the easiest
way to implement it.

|_  _  _ __
|_)(_)| ),'
------- '---



More information about the Gcc mailing list