In working on fixing hiddenness, I discovered some suspicious code in template instantiation. I suspect it dates from when we didn't do the hidden friend injection thing at all. The xreftag finds the same class, but makes it visible to name lookup. Which is wrong. hurrah, fixing a bug by deleting code! gcc/cp/ * pt.c (instantiate_class_template_1): Do not repush and unhide injected friend. gcc/testsuite/ * g++.old-deja/g++.pt/friend34.C: Check injected friend is still invisible. pushed to trunk nathan -- Nathan Sidwell