This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Support %N$/*N$ style format arguments in GCC diagnostics
Jakub Jelinek <email@example.com> writes:
> So do you suggest to change the meaning of %H?
> ATM, at the beginning of format string it means setting of the diagnostic
> context to the given location. In the middle of format string, it causes
> file 'FILE' line LINENO to be printed in the middle of the message.
> Do you suggest that %H anywhere in the string would just set the diagnostic
> context (as well as %J and %+<code with tree>)?
Yes. If you look in gcc.pot, you'll see that %H and %J currently
appear exclusively at the beginning of the string, so this wouldn't
 $ grep -nH -e '[^"]%[JH]' gcc.pot
gcc.pot:7889:msgid "invalid %%H value"
gcc.pot:7894:msgid "invalid %%J value"
gcc.pot:7992:msgid "invalid operand to %%H/%%L code"
gcc.pot:10560:msgid "invalid %%J code"