* pt.c (tsubst_decl): Robustify.

From-SVN: r30716
This commit is contained in:
Mark Mitchell 1999-11-29 23:39:29 +00:00 committed by Mark Mitchell
parent f9011d0459
commit de96bf571d
3 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,7 @@
1999-11-29 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): Robustify.
1999-11-27 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Call expand_body for inline functions

View File

@ -5863,7 +5863,7 @@ tsubst_decl (t, args, type, in_decl)
my_friendly_assert (DECL_LANG_SPECIFIC (t)
&& DECL_TEMPLATE_INFO (t) != NULL_TREE, 0);
if (TYPE_P (DECL_CONTEXT (t)))
if (TYPE_P (CP_DECL_CONTEXT (t)))
ctx = tsubst_aggr_type (DECL_CONTEXT (t), args,
/*complain=*/1,
in_decl, /*entering_scope=*/1);

View File

@ -0,0 +1,13 @@
// Build don't link:
// Origin: Mark Mitchell <mark@codesourcery.com>
template <class T>
void f ()
{
extern int i;
extern T j;
i = j;
}
template void f<int>();