This is the mail archive of the gcc@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: Updated GCC vs Clang diagnostics


On Fri, Apr 13, 2012 at 04:09:19AM -0500, Gabriel Dos Reis wrote:
> the short term desire to add color should not cloud the architectural concerns.
> I don't want to get into a situation when in 3 months someone come and complain
> that the diagnostic code is too obscure or to hard to debug, and when pressed
> to explain declares that it was just out of frustration or irony --
> and even if it was
> just frustration, that is a concern.

On the other side, at least for basic color support I see no reason why it
would imply the need for any rearchitecturing of the diagnostic machinery.
If all we want to initially color is error: in one kind of color, warning:
in another one, note: in another one, caret line perhaps some other, then it
is just a matter of inserting a few pp_color_switch (pp, COLOR_ERROR); ...
pp_color_switch (pp, COLOR_NORMAL);.  Or if slightly more is needed, it can be
added around some format %letter handlers, say %T could print in some
special color if requested.  At that point we can have the color support
written and if some diagnostic machinery redesign is implemented later,
it won't be hard to adjust to it and do more color if desired.

Shooting down a potentially user friendly feature to wait until some blue
sky redesign is implemented means it might never be implemented.

	Jakub


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