This is the mail archive of the gcc-patches@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


On Sun, 20 Jul 2003, Ishikawa wrote:

>     BTW, Does anyone use the format_decoder function?
>     (It looks that a format_decoder, c_tree_printer in
>     c-objc-common.c, is used. But it seems to be used for
>     internal compiler diagnostics and so we don't need to
>     use positional parameter with it. So we don't lose if I am not
>     mistaken.)

It is extensively used by the C++ front end, and now extensively used by 
the C front end after Gaby's removal of usage of warning_with_decl etc. - 
it is clearly necessary to handle usages such as %2$D.  In fact you will 
see that the Turkish language translation already has usages such as %3$T.
You'll probably need to split the interface for custom decoders into 
separate parts to decode the type wanted and store type information; to 
extract the argument value from the variable arguments; and to print that 
previously extracted value.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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