[PATCH 1/2] make the c++ pretty printer inherit from the C one instead of include it

Trevor Saunders tsaunders@mozilla.com
Mon Aug 5 01:40:00 GMT 2013


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.

Trev

>   * override those that needed to be overridden  in cxx_pretty_printer.
>   * adjust the macros.
>   * Have the associated constructors do the right thing.
> 
> 
> 
> -- Gaby



More information about the Gcc-patches mailing list