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: Special handling of "%H" (Re: Support for %d$c format specifierin diagnostics.c)


On Sun, 27 Jul 2003, Zack Weinberg wrote:

> We do not have established lines of communication with the Translation
> Project, so I do not want to try to explain to the translators that
> they need to ignore the %H and count from the next argument.  I'd

Also, this notion (that %H consumes an argument, but operand numbers count
from the next argument) is entirely unknown to the format checking code.  
That doesn't matter as long as the rule is followed that operand numbers
are only ever used in .po files, but it might be possible to write a
script that uses GCC's built-in format checking to validate .po files (by
substituting the strings directly into GCC's source and building the
compiler), which would fail if the .po files start having formats not
comprehensible to the format checking code.

I agree that since %H is a format that does consume an argument, it should
become %1$H when operand numbers are used (with special handling for %1$H
at the start, if necessary) and the subsequent operands should be counted
from 2 as usual.

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