This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH:
Jakub Jelinek <jakub@redhat.com> writes:
| On Wed, Feb 23, 2005 at 06:51:46PM +0100, Gabriel Dos Reis wrote:
| > | 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++.
| >
| > many C++ programs are full of macros (more than would be desired).
| > And more and moe popular C++ libraries seem to make far more
| > extensive use of macros than in average programs in the past.
|
| But a single statement expression can have thousands statements in
| it, do you want to print them all?
Usually the error appears in a sub-statement; for most part it
suffices to point to that statement. An opaque "({ ... })" does not
help.
-- Gaby