decl.c (grokdeclarator): Count partial specializations when keeping track of how many template classes...
* decl.c (grokdeclarator): Count partial specializations when keeping track of how many template classes have been seen. * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. From-SVN: r32743
This commit is contained in:
parent
770ae6cc71
commit
da8a745625
@ -1,3 +1,10 @@
|
||||
2000-03-25 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl.c (grokdeclarator): Count partial specializations when
|
||||
keeping track of how many template classes have been seen.
|
||||
|
||||
* dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
|
||||
|
||||
Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* class.c (build_vbase_pointer_fields): layout_field now place_field.
|
||||
|
@ -10647,9 +10647,21 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
|
||||
t = ctype;
|
||||
while (t != NULL_TREE && CLASS_TYPE_P (t))
|
||||
{
|
||||
if (CLASSTYPE_TEMPLATE_INFO (t) &&
|
||||
!CLASSTYPE_TEMPLATE_SPECIALIZATION (t))
|
||||
/* You're supposed to have one `template <...>'
|
||||
for every template class, but you don't need one
|
||||
for a full specialization. For example:
|
||||
|
||||
template <class T> struct S{};
|
||||
template <> struct S<int> { void f(); };
|
||||
void S<int>::f () {}
|
||||
|
||||
is correct; there shouldn't be a `template <>' for
|
||||
the definition of `S<int>::f'. */
|
||||
if (CLASSTYPE_TEMPLATE_INFO (t)
|
||||
&& (CLASSTYPE_TEMPLATE_INSTANTIATION (t)
|
||||
|| uses_template_parms (CLASSTYPE_TI_ARGS (t))))
|
||||
template_count += 1;
|
||||
|
||||
t = TYPE_MAIN_DECL (t);
|
||||
if (DECL_LANG_SPECIFIC (t))
|
||||
t = DECL_CONTEXT (t);
|
||||
|
@ -609,6 +609,7 @@ dequeue_and_dump (di)
|
||||
break;
|
||||
|
||||
case TEMPLATE_DECL:
|
||||
dump_child ("rslt", DECL_TEMPLATE_RESULT (t));
|
||||
dump_child ("inst", DECL_TEMPLATE_INSTANTIATIONS (t));
|
||||
dump_child ("spcs", DECL_TEMPLATE_SPECIALIZATIONS (t));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user