[PATCH,c++] fix PR 45330, suggest alternatives for failed name lookups

Dodji Seketeli dodji@redhat.com
Sat Dec 4 14:06:00 GMT 2010


Nathan Froyd <froydnj@codesourcery.com> writes:

[...]

>
> One thing that really threw me from the diagnostics is that the C++
> language-specifier formatter can set the location of the message
> (error.c:cp_printer).  That seems a little weird--it would be better if
> the location were explicit at the point of the diagnostic, rather than
> arising from the things being printed.

>From what I understand, it's more that cp_printer chooses a location
among several locations that it gets implicitely. "Implicitely" because
those locations are carried by the trees passed to cp_printer.

It could be desirable to let cp_printer keep dealing with the details of
choosing locations, if [for instance] we were to move to range based
diagnostics. By range based diagnostics I mean being able to tell the
user that erroneous construct spans from location L0 to location L1.

In any case, this is maybe out of the scope of your current work, so I
might as well stop distracting you :-)

-- 
	Dodji



More information about the Gcc-patches mailing list