public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
Cc: Roland Illig <roland.illig@gmx.de>, GCC Development <gcc@gcc.gnu.org>
Subject: Re: diagnostics: %<%s%> vs. %qs
Date: Fri, 10 Mar 2017 17:26:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1703101724260.21146@digraph.polyomino.org.uk> (raw)
In-Reply-To: <b3d96010-5380-11bc-c6c1-292bb4ac86a8@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On Fri, 10 Mar 2017, Manuel López-Ibáñez wrote:

> On 07/03/17 20:38, Roland Illig wrote:
> > Hi,
> > 
> > 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'.

The 'q' flag is part of the generic pretty-print.c:pp_format formatting.  
Thus, everything using the generic pretty-printing can handle the 'q' flag 
(whereas %T requires a function with support for the tree formats as well 
as the base class ones).

-- 
Joseph S. Myers
joseph@codesourcery.com

      reply	other threads:[~2017-03-10 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 20:38 Roland Illig
2017-03-10  7:57 ` Manuel López-Ibáñez
2017-03-10 17:26   ` Joseph Myers [this message]

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=alpine.DEB.2.20.1703101724260.21146@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc@gcc.gnu.org \
    --cc=lopezibanez@gmail.com \
    --cc=roland.illig@gmx.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).