public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 4/5] c-family: clean up the data tables in c-format.c
Date: Tue, 31 Jul 2018 13:08:00 -0000	[thread overview]
Message-ID: <20180731130811.GI3264@redhat.com> (raw)
In-Reply-To: <CAFiYyc1RjpC430vE07ap9QtAQjm7zeUgDSw+VEbc_rspO+cQPg@mail.gmail.com>

On Tue, Jul 31, 2018 at 02:56:29PM +0200, Richard Biener wrote:
> On Fri, Jul 27, 2018 at 11:48 PM David Malcolm <dmalcolm@redhat.com> wrote:
> >
> > The format_char_info tables in c-format.c for our own formats contain
> > a lot of repetition.
> >
> > This patch adds a macro to express the conversion specifiers implemented
> > within pp_format, making it clearer which are custom ones added by the
> > various diagnostic_format_decoder callbacks.
> >
> > Doing so uncovered a few mistakes in the data (based on comparison with
> > the source of the diagnostic_format_decoder callbacks, and the notes
> > below), which the patch fixes:
> >
> > - gcc_diag_char_table didn't have 'Z', but it *is* implemented by pp_format.
> >
> > - removed erroneous 'G' and 'K' entries from gcc_diag_char_table: they're
> >   implemented by default_tree_printer (and thus in "tdiag") and by the
> >   C/C++ FEs, but not in pp_format.
> >
> > - removed "v" (lower case) from gcc_tdiag_char_table and
> >   gcc_cxxdiag_char_table
> >
> > Notes:
> >
> > pretty-print.h uses this for ATTRIBUTE_GCC_PPDIAG, used by pp_printf
> > and pp_verbatim:
> >
> > whereas diagnostic-core.h uses this for ATTRIBUTE_GCC_DIAG, used by
> > the various diagnostic functions:
> >
> > /* If we haven't already defined a front-end-specific diagnostics
> >    style, use the generic one.  */
> >
> > Hence I'm assuming that __gcc_diag__ is for use for when we don't
> > know what kind of diagnostic_format_decoder we have, and we can
> > only rely on pp_format's core functionality, where __gcc_tdiag__
> > is allowed to assume default_tree_printer.
> 
> OK if nobody objects.

Looks fine to me, too.

Marek

  reply	other threads:[~2018-07-31 13:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 21:47 [PATCH 0/5] dump_printf support for middle-end types David Malcolm
2018-07-27 21:47 ` [PATCH 3/5] C++: clean up cp_printer David Malcolm
2018-07-28 14:06   ` Jason Merrill
2018-07-27 21:47 ` [PATCH 1/5] Simplify dump_context by adding a dump_loc member function David Malcolm
2018-07-31 12:51   ` Richard Biener
2018-07-27 21:47 ` [PATCH 5/5] Formatted printing for dump_* in the middle-end David Malcolm
2018-07-31 13:03   ` Richard Biener
2018-07-31 14:19     ` David Malcolm
2018-07-31 14:21       ` Richard Biener
2018-07-31 14:33         ` Richard Biener
2018-07-31 19:56       ` Joseph Myers
2018-08-02 17:09         ` [PATCH] v2: " David Malcolm
2018-08-09 22:11           ` Joseph Myers
2018-08-17  4:08           ` Jeff Law
2018-08-17 18:24             ` David Malcolm
2018-08-27  6:58           ` Jakub Jelinek
2018-08-27 23:46             ` [PATCH] Fix version check for ATTRIBUTE_GCC_DUMP_PRINTF David Malcolm
2018-08-28  6:44               ` Jakub Jelinek
2018-08-28 12:26                 ` Jakub Jelinek
2018-08-28 14:19                   ` David Malcolm
2018-07-27 21:47 ` [PATCH 4/5] c-family: clean up the data tables in c-format.c David Malcolm
2018-07-31 12:56   ` Richard Biener
2018-07-31 13:08     ` Marek Polacek [this message]
2018-07-27 21:47 ` [PATCH 2/5] dumpfile.c: eliminate special-casing of dump_file/alt_dump_file David Malcolm
2018-07-31 12:54   ` Richard Biener
2018-07-31 15:34     ` David Malcolm
2018-07-31 15:37       ` Richard Biener
2018-07-31 12:50 ` [PATCH 0/5] dump_printf support for middle-end types Richard Biener
2018-07-31 14:01   ` David Malcolm

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=20180731130811.GI3264@redhat.com \
    --to=polacek@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).