This is the mail archive of the gcc@gcc.gnu.org mailing list for the EGCS 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


> I don't know what what would be the best solution to this problem is
> but for god sakes something needs to be done as wading through what
> all this means is a rather difficult task.

Thanks for your bug report. Rest assured that the g++ maintainers are
aware of the problem.

> I would like to see a solution where the compile tracks keep tracks of
> the typedef currently in uses that name instead of the fully expanded
> one.  I am not saying it would be easy but it would go a LONG way in
> producing much for readable messages.  

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?

> Also why does gcc only give the line number when giving an error
> message.  A character offset in many cases would be very useful as
> often something like before '(' is not very useful when there is a
> parse or syntax error as I have many '(' on one line.

The problem is that the error messages are produced by cc1plus, after
the preprocessor has already converted the input. Character positions
are not meaningful, then, since macro expansions might have taken
place. This could improve with cpplib integration.

> I really hope someone will take me seriously.  And, before you ask, I do
> not have the knowledge or time to do it my self.

Depends on what you mean by "seriously". If you expect to get a
serious answer, well, I tried. If you mean that anybody is acting on
any of those issues right now, or even in the near future - unlikely.

Regards,
Martin

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