This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/2] make the c++ pretty printer inherit from the C one instead of include it
- From: Trevor Saunders <tsaunders at mozilla dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 4 Aug 2013 21:37:49 -0400
- Subject: Re: [PATCH 1/2] make the c++ pretty printer inherit from the C one instead of include it
- References: <1375319690-12939-1-git-send-email-tsaunders at mozilla dot com> <1375319690-12939-2-git-send-email-tsaunders at mozilla dot com> <CAAiZkiDQ1=0XdKhOtNT0RXTiF+Bs-Aa4wAdLfjpOj86psFCEBA at mail dot gmail dot com>
On Wed, Jul 31, 2013 at 10:02:29PM -0500, Gabriel Dos Reis wrote:
> * declare the "pointer to function fields" as virtual functions --
> that is what I meant
> with the (necessarily poor) emulation through the casts.
I guess you'll work on this later in the patch series you're sending,
but its worth noting making pretty_print_info::format_decoder a virtual
function is non-trivial, it turns out to be important that some
consumers can leave it null instead of making it what is currently
default_tree_printer. This is because gcov and maybe other things link
against diagnostic.c and pretty-print.c but not all the tree stuff that
would be required for default_tree_printer.
> * override those that needed to be overridden in cxx_pretty_printer.
> * adjust the macros.
> * Have the associated constructors do the right thing.
> -- Gaby