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]

Re: Improving C++ error messages


"Martin v. Loewis" wrote:
> g++ already uses the typedefs to shorten names of template
> instantiations. I don't know why it does not work in your
> case. Perhaps the typedef names where not used in the instantiations?

The error message output for templates uses the cached template name (rather
than synthesizing `X<int>' at the message generation time). This of course
means that the canonical template name is used which looks through typedefs.

As it happens I've a rather substantial patch for the error dumping which gives
better control over this kind of thing. The basic problem in error.c is that
all the functions seriously overload the use of the `v' verbose flag to mean
all sorts of different things in different contexts. I replaced this by a bit
mask, separating each switch.

I've not submitted this patch because I need to separate out some other bits
from it and anyway didn't want to add to the backlog I've already got :-) I'll
get round to it when my compute resource is fully functional again :-(

nathan
-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
        I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk


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