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: C++ PATCH:


On Wed, Feb 23, 2005 at 12:14:23PM -0500, Jason Merrill wrote:
> On 23 Feb 2005 16:49:51 +0100, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> 
> > Neil Booth <neil@daikokuya.co.uk> writes:
> >
> > | Gabriel Dos Reis wrote:-
> > | 
> > | > That statement is factually false as can be verified with EDG-3.5:
> > | 
> > | Oh come on Gaby, that's not printing an expression, it prints
> >
> > Please, the statement was that EDG does not print expression outside
> > declarations.  But the fact is it does not just print declarations.  It
> > prints also statements and expressions part of those statements.
> 
> I have no idea whether or not that's true, but as Neil says your example
> does not support that claim.  Textually reproducing an input line in a
> diagnostic is very different from reconstructing it in the pretty-printer.

I think that the best solution for the long term is the caret approach,
printing out the original source line that the user typed.  Trying to
re-generate the expression from the tree is likely to generate something
completely unlike the text of the original program.  I do acknowledge that
re-generating the expression could be helpful in the case where a macro
expands into something the user did not expect, but that's not going to be
the common case in C++.

Also, we maintain a standard of civility on this list.  I've been known
to violate it occasionally, but when I do I promptly apologize.  Let's
try to express our disagreements without treating each other with
disrespect.



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