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


Paolo Bonzini wrote:

> > > >The only tile missing to the 1.0 release is dynamic loading of custom
> > > >specifiers.
> > >
> > > How is the tile coming?
> >
> > I don't know precisely what Paolo is referring to.  Paolo?  :-)
> 
> This meant dynamic loaded .so modules.  I don't find it particularly useful,
> but Gary Vaughan did, maybe because he needed it in m4.  But now, 1.0 has
> been released and does have this.

This sounds like an overkill for GCC's diagnostic needs.

Within GCC, a client, i.e. program, f GCC diagnostic routines,
registers a custom decoder for parsing format specifier characters such
as
%D %T, etc. which are used only by C, C++, and objc frontends.
When such format characters not handled by the default
format routine within diagnostic.c,
the default handler calls the registered custom decoder by
passing the processing context (output string buffer, 
passed format string, passed argument list).

Right now, I am trying to accommodate the
necessary hand-shaking between the default format routine,
and the custom decoder when positional parameters are present.

Obviously, since there are only a few front ends, and
the current way of extending the format specifier is not
very dynamic (the way it is used) in that once the compiler front ends
registeres the custom decoder, it is not likely to be changed at all.
Loading of *.so sounds a little overkill for GCC diagnostic routine.

Still, I kind of sense there are a lot of duplicate work being done.
Such is life, isn't it?

> > 4.  It was written to be included with libiberty.
> 
> I don't remember what we decided on ANSIfication... IIRC we went on because
> GCC was being ANSIfied.  I am a bit rusty (and bored) on libiberty, when
> will it be ANSIfied at last???

It is dawning on me that
this work on Savannah is to make the s{n}printf in libiberty to
conform to ANSI? (And that libiberty is a small subset of C
routine necessary for inclusion in various programs?).

Is this s{n}printf already in libiberty?

-- 
int main(void){int j=2003;/*(c)2003 cishikawa. */
char t[] ="<CI> @abcdefghijklmnopqrstuvwxyz.,\n\"";
char *i ="g>qtCIuqivb,gCwe\np@.ietCIuqi\"tqkvv is>dnamz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof t-1),
(putchar(t[j])));return 0;}/* under GPL */


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