Specialization in templates

Joe Buck jbuck@synopsys.com
Sat Oct 31 16:39:00 GMT 1998


> Ok, I managed to introduce a modification in the grammar that catches
> this case, and prints an error message.  However, after that, the
> template processing prints another error message that I can't find a
> way to avoid :-(

Mark's expressed some concerns about mucking with the bison grammar,
and given that you've introduced a new reduce/reduce conflict it
seems real (a different grammatical structure might get rid of that problem).
[ To Mark: if there is a fix that *doesn't* add conflicts or add
complexity I think it should be accepted ].

But disregarding that issue:

> oliva@tiete% ./cc1plus -quiet ~/t.cc
> /home/phd/oliva/t.cc:1: template class A was not declared yet

A might never be declared as a template, it might be a typo.  How
about

/home/phd/oliva/t.cc:1: identifier `A' has not been declared as a template



More information about the Gcc mailing list