This is the mail archive of the 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]

Re: [patch] Fix PR c++/29022

Hi Mark,

The attached patch implements your suggestion of moving the call to
xref_basetypes from cp_parser_class_head to cp_parser_class_specifier
and to only call it if the opening brace for the class was found.

Bootstrapped and regression tested where the only failures are those
caused by PR29879.

Ok to apply?




2006-11-18 Lee Millward <>

	PR c++/29022
	* parser.c (cp_parser_class_head): Move processing
	of any base classes to...
	(cp_parser_class_specifier) Take an extra
	tree* parameter for the base classes. Only process
	them if the opening brace was found.


2006-11-18 Lee Millward <>

	PR c++/29022
	* g++.dg/inherit/virtual2.C: New test.
	* g++.dg/inherit/virtual3.C: Likewise.
	* g++.old-deja/g++.bugs/900121_05.C: Adjust error markers.
	* g++.dg/inherit/error2.C: Likewise.
	* g++.dg/template/instantiate1.C: Likewise.

On 10/19/06, Lee Millward <> wrote:
On 10/19/06, Mark Mitchell <> wrote:
> 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
> (650) 331-3385 x713

Sure, I'll try your suggesstion and will report back with the results.


Attachment: pr29022.txt
Description: Text document

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