This is the mail archive of the
mailing list for the GCC project.
Re: diagnostics: %<%s%> vs. %qs
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Roland Illig <roland dot illig at gmx dot de>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 10 Mar 2017 07:57:24 +0000
- Subject: Re: diagnostics: %<%s%> vs. %qs
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On 07/03/17 20:38, Roland Illig wrote:
in the diagnostics the %qs specifier is used in most of the cases. But
there are some cases left where the more complicated %<%s%> is used. Is
there a good reason to prefer the complicated spelling?
Same for %<%T%> and %qT, and similar letters.
'q' is a flag supported by some format codes but not all. Also, although
different parts of the compiler may support the same format codes (%T), not all
may have support for 'q' yet. Finally, there may be some code using %<%T%> that
predates the existence of '%qT'.
Ideally, we should move all the code to use 'q' and leave %<%> for specific
cases like quoting text: "%<--help%>"
Any help on this is appreciated: