[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3442.0. "Compiler diagnostics for templates revisited" by NETRIX::"[email protected]" (Bill Reese) Mon Feb 10 1997 17:05

     I'm porting a bunch of customer code (around 200k lines), that uses
templates extensively, to alphas (VMS for now, DU later).  After adding
constructors, operators, etc. to extend some of their types to handle 64 bit
integers, I (of course!) missed some of the operators and constructors that
I need to have for the silly thing to compile.  Oh, by the way, I'm using the
/template_define=local switch.  The compiler (V5.5-017 on OpenVMS 7.1)
responds with something exciting like:

%CXX-I-OVERMATCHTRY ... tried to match "operator whatever" with ...

for about a billion (it seems) different definitions of the operator in
question.  It's nice to know what it doesn't match, but what I really need to
know is what it's looking for so I'll know what other operators/constructors
I need to define.  Is there any way of getting that information from the
compiler?  It obviously knows what it's looking for, and it would take me
a loooong time to figure out all the convolutions they're doing with their
template arguments.

     Note 2256 has some related questions, and the compiler team respondent
said something like "yeah, that sounds good and we'll add it to our list".
Is there anything to help out with this?  Are there tools out on the net to
resolve problems like this?  (Maybe a modified version of g++ that spits out
a text version of all the template instantiations and whether the supporting
declarations exist?)

Thanks,
Bill Reese

[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
3442.1GNU DiagnosticsNETRIX::"[email protected]"Bill ReeseWed Feb 12 1997 14:226
     I've since compiled GNU g++ 2.7.2.2 for DU, and it's diagnostics are much
more helpful.  It tells you what template arguments it's trying to match,
and gives you a list of the included files it used getting there.
Bill Reese
[Posted by WWW Notes gateway]
3442.2DECC::FOLTANThu Feb 13 1997 17:0212
Bill,

Yes, I agree that DEC C++ does a poor job with 
instantiation error messages.  There error messages
should at least contain the name of the template
class or function and the type you are trying
to instantiate the template with.  This problem
is on our open problem reports already.  I will
cross post your note as well.  

Lois Foltan
3442.3DECC::FOLTANThu Feb 20 1997 15:1112
Just to follow up.  We have recently completed work to 
enhance the error diagnostics that are generated 
during template instantiation.  Diagnostics are now 
accompanied by information indicating the name of 
the template currently being instantiated, the 
type used for instantiation, and the point of 
instantiation location.  This enhancement will be 
available in a future release.

Lois Foltan
DEC C++ Development