* decl.c (create_implicit_typedef): Set TYPE_STUB_DECL here.
(cxx_init_decl_processing): Not here.
* name-lookup.c (pushtag): Or here.
* pt.c (lookup_template_class): Or here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154163
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-11-13 Jason Merrill <jason@redhat.com>
+ PR c++/29363
+ * decl.c (create_implicit_typedef): Set TYPE_STUB_DECL here.
+ (cxx_init_decl_processing): Not here.
+ * name-lookup.c (pushtag): Or here.
+ * pt.c (lookup_template_class): Or here.
+
PR c++/35075
* pt.c (convert_nontype_argument): Give helpful error about
reference variable argument to reference template parameter.
amongst these. */
SET_DECL_IMPLICIT_TYPEDEF_P (decl);
TYPE_NAME (type) = decl;
+ TYPE_STUB_DECL (type) = decl;
return decl;
}
bad_alloc_decl
= create_implicit_typedef (bad_alloc_id, bad_alloc_type_node);
DECL_CONTEXT (bad_alloc_decl) = current_namespace;
- TYPE_STUB_DECL (bad_alloc_type_node) = bad_alloc_decl;
pop_namespace ();
ptr_ftype_sizetype
decl = TYPE_NAME (type);
gcc_assert (TREE_CODE (decl) == TYPE_DECL);
- TYPE_STUB_DECL (type) = decl;
/* Set type visibility now if this is a forward declaration. */
TREE_PUBLIC (decl) = 1;
type_decl = create_implicit_typedef (DECL_NAME (gen_tmpl), t);
DECL_CONTEXT (type_decl) = TYPE_CONTEXT (t);
- TYPE_STUB_DECL (t) = type_decl;
DECL_SOURCE_LOCATION (type_decl)
= DECL_SOURCE_LOCATION (TYPE_STUB_DECL (template_type));
}
2009-11-13 Jason Merrill <jason@redhat.com>
+ PR c++/29363
+ * g++.dg/template/error43.C: New.
+
PR debug/26965
* g++.dg/debug/dwarf2/static-data-member2.C: New.
--- /dev/null
+// PR c++/29363
+
+template<int> void foo()
+{
+ throw A(); // { dg-message "declar" }
+ struct A {} a;
+}
+
+template void foo<0>(); // { dg-message "instantiated" }