On Thu, Mar 22, 2012 at 11:13 AM, Marc Glisse <marc.gli...@inria.fr> wrote:

> I haven't followed the whole diagnostic discussion, but what about printing
> both the reconstructed expression and the types?

Printing both isn't really the issue -- and we probably should.  (And I thought
we did in some cases.)

What is at issue is that the tree we print is one that is of a too
low-level form, sometimes
a bit removed from what user wrote (e.g. containing too much information to be
usefully processed by the user) therefore adding some confusion.  There are
several ways around this: (a) print the expression as written by the user
(this usually means dumping verbatim the expression from the input source file);
(b) reconstruct the expression from the tree but with a much higher level view
(this may be possible if the C++ front-end preserves certain properties from the
source code, but currently it does not.)

People usually refers to (a) as diagnostics with caret, because some popular
compilers dump the user input source file and use carets to delimit
the boundaries
of the expression under scrutiny.

-- Gaby


>
> --
> Marc Glisse

Reply via email to