C++ error printer cleanup, phase 1

Gabriel Dos Reis gdr@codesourcery.com
Mon Sep 24 15:37:00 GMT 2001


Zack Weinberg <zack@codesourcery.com> writes:

| On Mon, Sep 24, 2001 at 05:30:07AM +0200, Gabriel Dos Reis wrote:
| > 
| > | cpplib has no global variables - this is a deliberate design
| > | decision.  As such all its error routines have a signature like
| > 
| > That deliberate design is something I do appreciate, and successive
| > patches I've cheked in were so as to get rid of reference to global
| > variables. You might want to check for past patches.
| 
| It matters very little if diagnostic.c itself uses no global
| variables, given that the *interface* used by the rest of the compiler
| does.

You miss the point of the diagnostic preoject.  Please check out
cp-branch-parser, to see why it is desirable to get rid of much global
variables as possible.

[...]

| Um, I am not disputing that unification is desirable.  I simply do not
| personally have the time to do it right now.

Fair enough.  But please, do not unncessarily complicate others' ongoing
efforts to have that project done.

[...]

| - The context-printing and line-wrapping code.  I do not understand
|   this part at all,

cp-parser-branch needs context switching; outputting diagnostics
related to templates needs context-switching; line-wrapping was part
of the initial project.

[...]

| Several future directions have been suggested, but at present I don't
| have time to give any of them the attention they require.

Fair enough. Please don't hinder other efforts on ongoing projects
because of a supposed type-violation in the C++ front-end.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com



More information about the Gcc-patches mailing list