Commit f6a7cfd2 by Mark Mitchell Committed by Mark Mitchell

lex.c (make_lang_type): Create TYPE_BINFO for TEMPLATE_TYPE_PARMs just like for non-template types.

	* lex.c (make_lang_type): Create TYPE_BINFO for
	TEMPLATE_TYPE_PARMs just like for non-template types.

From-SVN: r27259
parent fcd3f0bc
1999-05-30 Mark Mitchell <mark@codesourcery.com> 1999-05-30 Mark Mitchell <mark@codesourcery.com>
* lex.c (make_lang_type): Create TYPE_BINFO for
TEMPLATE_TYPE_PARMs just like for non-template types.
* decl.c (start_decl): Move checks on initialization to ... * decl.c (start_decl): Move checks on initialization to ...
(cp_finish_decl): Here. Tidy formatting slightly. (cp_finish_decl): Here. Tidy formatting slightly.
......
...@@ -4680,7 +4680,6 @@ make_lang_type (code) ...@@ -4680,7 +4680,6 @@ make_lang_type (code)
TYPE_LANG_SPECIFIC (t) = pi; TYPE_LANG_SPECIFIC (t) = pi;
SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown); SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown);
CLASSTYPE_INTERFACE_ONLY (t) = interface_only; CLASSTYPE_INTERFACE_ONLY (t) = interface_only;
TYPE_BINFO (t) = make_binfo (integer_zero_node, t, NULL_TREE, NULL_TREE);
/* Make sure this is laid out, for ease of use later. In the /* Make sure this is laid out, for ease of use later. In the
presence of parse errors, the normal was of assuring this presence of parse errors, the normal was of assuring this
...@@ -4698,6 +4697,13 @@ make_lang_type (code) ...@@ -4698,6 +4697,13 @@ make_lang_type (code)
clear it here. */ clear it here. */
TYPE_ALIAS_SET (t) = 0; TYPE_ALIAS_SET (t) = 0;
/* We need to allocate a TYPE_BINFO even for TEMPALTE_TYPE_PARMs
since they can be virtual base types, and we then need a
canonical binfo for them. Ideally, this would be done lazily for
all types. */
if (IS_AGGR_TYPE_CODE (code) || code == TEMPLATE_TYPE_PARM)
TYPE_BINFO (t) = make_binfo (integer_zero_node, t, NULL_TREE, NULL_TREE);
return t; return t;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment