This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Support for %d$c format specifier in diagnostics.c
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Ishikawa <ishikawa at yk dot rim dot or dot jp>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Zack Weinberg <zack at codesourcery dot com>, Neil Booth <neil at daikokuya dot co dot uk>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 20 Jul 2003 15:46:14 +0100 (BST)
- Subject: Re: Support for %d$c format specifier in diagnostics.c
- References: <m19WKhW-000H3mC@standard.erephon> <20030628193135.GA1767@daikokuya.co.uk> <87llvlk3gi.fsf@egil.codesourcery.com> <3EFE65DC.52576EC7@yk.rim.or.jp> <87vfupiglu.fsf@egil.codesourcery.com> <3EFEE0EF.C560ED1A@yk.rim.or.jp> <87isqoiwng.fsf@egil.codesourcery.com> <3F061172.814BA7A0@yk.rim.or.jp> <Pine.LNX.4.56.0307051127540.6302@kern.srcf.societies.cam.ac.uk> <3F0CA938.1FA02D3E@yk.rim.or.jp> <m3vfuayizy.fsf@uniton.integrable-solutions.net><3F1A1654.4476090C@yk.rim.or.jp>
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