* decl.c (store_parm_decls): Don't build cleanups for parameters
while processing_template_decl.
From-SVN: r31842
+2000-02-07 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (store_parm_decls): Don't build cleanups for parameters
+ while processing_template_decl.
+
2000-02-07 Jason Merrill <jason@casey.cygnus.com>
* cp-tree.h (struct saved_scope): Add incomplete field.
else
cp_error ("parameter `%D' declared void", parm);
- cleanup = maybe_build_cleanup (parm);
+ cleanup = (processing_template_decl
+ ? NULL_TREE
+ : maybe_build_cleanup (parm));
if (cleanup)
cleanups = tree_cons (parm, cleanup, cleanups);
--- /dev/null
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+int i;
+
+struct S
+{
+ ~S ()
+ {
+ }
+};
+
+template <class T>
+void f (T, S)
+{
+ i = 0;
+}
+
+int main ()
+{
+ i = 1;
+ f (3, S ());
+ return i;
+}