to fail even with your change. I think the problem is that we're
remembering that B inherits from A, even when we don't have a definition
of B. We shouldn't do that; if B isn't actually complete, then we
should just forget all of its base classes. I would suggest moving the
xref_basetypes call out of cp_parser_class_head into
cp_parser_class_specifier, and calling it only if we find the open curly
brace for the class. At that point, we're committed to completing the
class, so we would avoid the inconsistent incomplete-but-has-bases
situation we get at present.
Would you mind trying that approach?
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713