Commit 6b9ab5cc by Mark Mitchell Committed by Mark Mitchell

pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO for TYPE_DECLs.

	* pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
	for TYPE_DECLs.

From-SVN: r21061
parent 71523737
1998-07-11 Mark Mitchell <mark@markmitchell.com>
* pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
for TYPE_DECLs.
1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com> 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
* cp-tree.h (warn_long_long): Define. * cp-tree.h (warn_long_long): Define.
......
...@@ -1808,8 +1808,18 @@ push_template_decl_real (decl, is_friend) ...@@ -1808,8 +1808,18 @@ push_template_decl_real (decl, is_friend)
if (CLASSTYPE_TEMPLATE_INSTANTIATION (ctx)) if (CLASSTYPE_TEMPLATE_INSTANTIATION (ctx))
cp_error ("must specialize `%#T' before defining member `%#D'", cp_error ("must specialize `%#T' before defining member `%#D'",
ctx, decl); ctx, decl);
if (TREE_CODE (decl) == TYPE_DECL && DECL_ARTIFICIAL (decl)) if (TREE_CODE (decl) == TYPE_DECL)
tmpl = CLASSTYPE_TI_TEMPLATE (TREE_TYPE (decl)); {
if (IS_AGGR_TYPE_CODE (TREE_CODE (TREE_TYPE (decl)))
&& CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (decl))
&& CLASSTYPE_TI_TEMPLATE (TREE_TYPE (decl)))
tmpl = CLASSTYPE_TI_TEMPLATE (TREE_TYPE (decl));
else
{
cp_error ("`%D' does not declare a template type", decl);
return decl;
}
}
else if (! DECL_TEMPLATE_INFO (decl)) else if (! DECL_TEMPLATE_INFO (decl))
{ {
cp_error ("template definition of non-template `%#D'", decl); cp_error ("template definition of non-template `%#D'", decl);
......
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