public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
To: Kai Henningsen <kaih@khms.westfalen.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: c++/7765 [Patch]
Date: Tue, 05 Nov 2002 09:50:00 -0000	[thread overview]
Message-ID: <20021105175012.GA1050@egil.codesourcery.com> (raw)
In-Reply-To: <8$GThgDXw-B@khms.westfalen.de>

On Tue, Nov 05, 2002 at 08:58:00AM +0200, Kai Henningsen wrote:
> bangerth@ticam.utexas.edu (Wolfgang Bangerth)  wrote on 28.10.02 in <Pine.LNX.4.44.0210281251240.736-100000@gandalf.ticam.utexas.edu>:
> 
> > > Yes, the order of formats must presently be preserved.  I realize that
> > > this interferes with proper translation.  What we need to do is
> > > implement the SVR4 "%1$x" printf extension: this allows you to write
> > >
> > >  msgid "statement about %d %s"
> > >  msgstr "statement about %2$s in quantity %1$d"
> > >
> > > (I will get to this eventually, but the list of things I will get to
> > > eventually has items on it from 1998, so don't hold your breath.
> > > Patches for diagnostic.c are welcome.)
> >
> > Doing this first, before cleaning up what is there now, may be even
> > the simpler way: about 1000 (half of the total) are ordering problems.
> > These could, to a large extent, probably be fixed if the SVR4 syntax would
> > be there, without even knowing the language in question. Maybe even
> > semiautomatically.
> 
> Unfortunately, that's not exactly trivial. Maybe one could steal the  
> relevant code from glibc?
> 
> Essentially, one would have to first build up a list of all specifiers in  
> the format string, hope that that gives no holes with unused parameters in  
> them where one does not know their type, then process the varargs with the  
> type info one has into that list, and finally do another pass to output  
> the whole mess - first and third pass in format string sequence, second  
> pass in argument sequence.

I'm working on just this.  It may take me awhile - it is indeed
nonobvious, and I don't intend to recycle the glibc code because it's
just too messy.

It may well be too invasive for 3.3 - we'll see.

zw

  reply	other threads:[~2002-11-05 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-28  7:43 [Patch] c++/7765 Wolfgang Bangerth
2002-10-28  8:32 ` c++/7765 [Patch] Zack Weinberg
2002-10-28  8:48   ` Wolfgang Bangerth
2002-10-28  9:59     ` Zack Weinberg
2002-10-28 10:57       ` Wolfgang Bangerth
2002-11-05  0:26         ` Kai Henningsen
2002-11-05  9:50           ` Zack Weinberg [this message]
2002-10-28 10:23   ` Joseph S. Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021105175012.GA1050@egil.codesourcery.com \
    --to=zack@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kaih@khms.westfalen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).