This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH diagnostics] PR 53061 cleanup initialization


I committed this as https://gcc.gnu.org/r216720 following all your
comments except for:


On 23 October 2014 12:31, Dodji Seketeli <dodji@redhat.com> wrote:
>> +
>> +/* Construct a C++-aware pretty-printer for CONTEXT.  It is assumed
>> +   that CONTEXT->printer is an already constructed basic pretty_printer.  */
>
> I'd be even more specific in the comment by saying that CONTEXT->printer
> is a basic pretty printer that was constructed presumably by
> diagnostic_initialize(), called early in the compiler's initialization
> process (in general_init) Before the FE is initialized.  This (C++)
> FE-specific diagnostic initializer is thus replacing the basic pretty
> printer with one that has C++-aware capacities.
>
> Or maybe write this generic big-picture awareness comment before the
> diagnostic_context::printer data member.  If you don't have time for
> this, I'll do it myself in a subsequent patch.  I am writing this, also
> for myself, as a reminder :-)

I did the former and not the latter because the basic pp does not need
to be overridden, the FEs can do it but they don't need to. Thus, I
was not sure what you really wanted me to write in diagnostic.h The
current comment is:

/* Where most of the diagnostic formatting work is done.  */
  pretty_printer *printer;

which admittedly is not that informative.

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]