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]
Other format: [Raw text]

Removing unspecified template parameters from error messages


Hi, since the topic was raised again last week, I tried to give a try 
at allowing gcc not to display the default template parameters when 
the defaults are in usage (ie when the user has not specified the 
argument). I'm not sure how an improvement it will be, but decided it 
was worth to try....

I think I made some progress toward such a goal (even though I'm sure 
that my first trial would need many corrections): I think I now mark 
correctly the arguments that were not specified.

Actually, the biggest problem I encounter is with the diagnostic 
machinery which does not propagate the proper information to the
function that displays a template class type (in this case it might
be just the number of template parameters to display or the args tree).

Solving this with minimal modifications require having a global variable
(this is what I may use to get first results), but this is rather ugly...

Would it be acceptable to replace the curreny flag parameter with sthg
slightly more complicated in all the diagnostic routines: eg a struct 
that conveys the actual flag + some "user data" (eg depending on the 
flag). This seems to be an overkill for one just little added value, 
however it might also be of some use elsewhere. I have not checked 
and do not know the diagnostic well enough yet.

Opinions are very welcome...

	Theo.
 


 --------------------------------------------------------------------
 Theodore Papadopoulo
 Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------




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