This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]